diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2025-06-16 15:33:48 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2025-06-16 15:33:48 +0300 |
| commit | 74e92a88013c2174af4a2ff38b128c9c6a18bce7 (patch) | |
| tree | 71223ccb8e5b060ac7dc257ac9a3edb2ef1ab75d | |
| parent | de5c5065fcf060bef155043db12b439fe605591b (diff) | |
| download | rust-74e92a88013c2174af4a2ff38b128c9c6a18bce7.tar.gz rust-74e92a88013c2174af4a2ff38b128c9c6a18bce7.zip | |
Format goto_type_definition
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide/src/goto_type_definition.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/goto_type_definition.rs b/src/tools/rust-analyzer/crates/ide/src/goto_type_definition.rs index 9781e7116de..c58e51487b7 100644 --- a/src/tools/rust-analyzer/crates/ide/src/goto_type_definition.rs +++ b/src/tools/rust-analyzer/crates/ide/src/goto_type_definition.rs @@ -70,11 +70,10 @@ pub(crate) fn goto_type_definition( } let range = token.text_range(); - sema.descend_into_macros_no_opaque(token,false) + sema.descend_into_macros_no_opaque(token, false) .into_iter() .filter_map(|token| { - sema - .token_ancestors_with_macros(token.value) + sema.token_ancestors_with_macros(token.value) // When `token` is within a macro call, we can't determine its type. Don't continue // this traversal because otherwise we'll end up returning the type of *that* macro // call, which is not what we want in general. @@ -103,7 +102,6 @@ pub(crate) fn goto_type_definition( _ => return None, } }; - Some(ty) }) }) |
