diff options
Diffstat (limited to 'crates/ide/src/references.rs')
-rw-r--r-- | crates/ide/src/references.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 3a4f4d80b..40d9487eb 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs | |||
@@ -1098,4 +1098,20 @@ fn foo<const FOO$0: usize>() -> usize { | |||
1098 | "#]], | 1098 | "#]], |
1099 | ); | 1099 | ); |
1100 | } | 1100 | } |
1101 | |||
1102 | #[test] | ||
1103 | fn test_find_self_ty_in_trait_def() { | ||
1104 | check( | ||
1105 | r#" | ||
1106 | trait Foo { | ||
1107 | fn f() -> Self$0; | ||
1108 | } | ||
1109 | "#, | ||
1110 | expect![[r#" | ||
1111 | Self TypeParam FileId(0) 6..9 6..9 Other | ||
1112 | |||
1113 | FileId(0) 26..30 Other | ||
1114 | "#]], | ||
1115 | ); | ||
1116 | } | ||
1101 | } | 1117 | } |