File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -511,6 +511,7 @@ fn write_bounds_like_dyn_trait(
511
511
GenericPredicate :: Implemented ( trait_ref) => {
512
512
if angle_open {
513
513
write ! ( f, ">" ) ?;
514
+ angle_open = false ;
514
515
}
515
516
if !first {
516
517
write ! ( f, " + " ) ?;
Original file line number Diff line number Diff line change @@ -766,6 +766,25 @@ fn main() {
766
766
)
767
767
}
768
768
769
+ #[ test]
770
+ fn hover_for_param_with_multiple_traits ( ) {
771
+ check (
772
+ r#"trait Deref {
773
+ type Target: ?Sized;
774
+ }
775
+ trait DerefMut {
776
+ type Target: ?Sized;
777
+ }
778
+ fn f(_x<|>: impl Deref<Target=u8> + DerefMut<Target=u8>) {}"# ,
779
+ expect ! [ [ r#"
780
+ *_x*
781
+ ```rust
782
+ impl Deref<Target = u8> + DerefMut<Target = u8>
783
+ ```
784
+ "# ] ] ,
785
+ )
786
+ }
787
+
769
788
#[ test]
770
789
fn test_hover_infer_associated_method_result ( ) {
771
790
check (
You can’t perform that action at this time.
0 commit comments