mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
feat: Handle operators like their trait functions in the IDE
This commit is contained in:
parent
cb52271701
commit
d6e78b04d0
12 changed files with 459 additions and 68 deletions
|
@ -204,7 +204,7 @@ impl StaticIndex<'_> {
|
|||
|
||||
fn get_definition(sema: &Semantics<'_, RootDatabase>, token: SyntaxToken) -> Option<Definition> {
|
||||
for token in sema.descend_into_macros(token) {
|
||||
let def = IdentClass::classify_token(sema, &token).map(IdentClass::definitions);
|
||||
let def = IdentClass::classify_token(sema, &token).map(IdentClass::definitions_no_ops);
|
||||
if let Some(&[x]) = def.as_deref() {
|
||||
return Some(x);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue