mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 19:17:12 +00:00
Format goto_type_definition
This commit is contained in:
parent
13a46eab7d
commit
5e37466de6
1 changed files with 2 additions and 4 deletions
|
|
@ -73,8 +73,7 @@ pub(crate) fn goto_type_definition(
|
||||||
sema.descend_into_macros_no_opaque(token, false)
|
sema.descend_into_macros_no_opaque(token, false)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|token| {
|
.filter_map(|token| {
|
||||||
sema
|
sema.token_ancestors_with_macros(token.value)
|
||||||
.token_ancestors_with_macros(token.value)
|
|
||||||
// When `token` is within a macro call, we can't determine its type. Don't continue
|
// 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
|
// this traversal because otherwise we'll end up returning the type of *that* macro
|
||||||
// call, which is not what we want in general.
|
// call, which is not what we want in general.
|
||||||
|
|
@ -103,7 +102,6 @@ pub(crate) fn goto_type_definition(
|
||||||
_ => return None,
|
_ => return None,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Some(ty)
|
Some(ty)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue