diff options
Diffstat (limited to 'crates/ide/src/hover.rs')
-rw-r--r-- | crates/ide/src/hover.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index 6022bd275..2024acd94 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs | |||
@@ -98,7 +98,6 @@ pub(crate) fn hover( | |||
98 | ast::NameRef(name_ref) => NameRefClass::classify(&sema, &name_ref).map(|d| d.referenced(sema.db)), | 98 | ast::NameRef(name_ref) => NameRefClass::classify(&sema, &name_ref).map(|d| d.referenced(sema.db)), |
99 | ast::Lifetime(lifetime) => NameClass::classify_lifetime(&sema, &lifetime) | 99 | ast::Lifetime(lifetime) => NameClass::classify_lifetime(&sema, &lifetime) |
100 | .map_or_else(|| NameRefClass::classify_lifetime(&sema, &lifetime).map(|d| d.referenced(sema.db)), |d| d.defined(sema.db)), | 100 | .map_or_else(|| NameRefClass::classify_lifetime(&sema, &lifetime).map(|d| d.referenced(sema.db)), |d| d.defined(sema.db)), |
101 | ast::SelfParam(self_param) => NameClass::classify_self_param(&sema, &self_param).and_then(|d| d.defined(sema.db)), | ||
102 | _ => None, | 101 | _ => None, |
103 | } | 102 | } |
104 | }; | 103 | }; |
@@ -3223,7 +3222,7 @@ impl Foo { | |||
3223 | } | 3222 | } |
3224 | "#, | 3223 | "#, |
3225 | expect![[r#" | 3224 | expect![[r#" |
3226 | *&self* | 3225 | *self* |
3227 | 3226 | ||
3228 | ```rust | 3227 | ```rust |
3229 | &Foo | 3228 | &Foo |
@@ -3243,7 +3242,7 @@ impl Foo { | |||
3243 | } | 3242 | } |
3244 | "#, | 3243 | "#, |
3245 | expect![[r#" | 3244 | expect![[r#" |
3246 | *self: Arc<Foo>* | 3245 | *self* |
3247 | 3246 | ||
3248 | ```rust | 3247 | ```rust |
3249 | Arc<Foo> | 3248 | Arc<Foo> |