We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bf6698 commit ad9afb2Copy full SHA for ad9afb2
crates/ra_ide/src/goto_type_definition.rs
@@ -16,11 +16,10 @@ pub(crate) fn goto_type_definition(
16
let token = pick_best(file.token_at_offset(position.offset))?;
17
let token = descend_into_macros(db, position.file_id, token);
18
19
- let node = token.value.ancestors().find_map(|token| {
20
- token
21
- .ancestors()
22
- .find(|n| ast::Expr::cast(n.clone()).is_some() || ast::Pat::cast(n.clone()).is_some())
23
- })?;
+ let node = token
+ .value
+ .ancestors()
+ .find(|n| ast::Expr::cast(n.clone()).is_some() || ast::Pat::cast(n.clone()).is_some())?;
24
25
let analyzer = hir::SourceAnalyzer::new(db, token.with_value(&node), None);
26
0 commit comments