diff options
Diffstat (limited to 'crates/ide/src/doc_links.rs')
-rw-r--r-- | crates/ide/src/doc_links.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/doc_links.rs b/crates/ide/src/doc_links.rs index 7bdd3cca3..461e11060 100644 --- a/crates/ide/src/doc_links.rs +++ b/crates/ide/src/doc_links.rs | |||
@@ -279,7 +279,7 @@ pub(crate) fn external_docs( | |||
279 | let token = pick_best(file.token_at_offset(position.offset))?; | 279 | let token = pick_best(file.token_at_offset(position.offset))?; |
280 | let token = sema.descend_into_macros(token); | 280 | let token = sema.descend_into_macros(token); |
281 | 281 | ||
282 | let node = token.parent(); | 282 | let node = token.parent()?; |
283 | let definition = match_ast! { | 283 | let definition = match_ast! { |
284 | match node { | 284 | match node { |
285 | ast::NameRef(name_ref) => NameRefClass::classify(&sema, &name_ref).map(|d| d.referenced(sema.db)), | 285 | ast::NameRef(name_ref) => NameRefClass::classify(&sema, &name_ref).map(|d| d.referenced(sema.db)), |