feat: Handle operators like their trait functions in the IDE

This commit is contained in:
Lukas Wirth 2022-08-05 14:16:36 +02:00
parent cb52271701
commit d6e78b04d0
12 changed files with 459 additions and 68 deletions

View file

@ -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 {