aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/goto_definition.rs2
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs1
2 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs
index 693344c31..620d2dedd 100644
--- a/crates/ra_ide/src/goto_definition.rs
+++ b/crates/ra_ide/src/goto_definition.rs
@@ -39,7 +39,7 @@ pub(crate) fn goto_definition(
39 reference_definition(&sema, &name_ref).to_vec() 39 reference_definition(&sema, &name_ref).to_vec()
40 }, 40 },
41 ast::Name(name) => { 41 ast::Name(name) => {
42 let def = classify_name(&sema, &name)?.definition(); 42 let def = classify_name(&sema, &name)?.into_definition()?;
43 let nav = def.try_to_nav(sema.db)?; 43 let nav = def.try_to_nav(sema.db)?;
44 vec![nav] 44 vec![nav]
45 }, 45 },
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index 19ecd54d6..f6b52c35d 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -363,6 +363,7 @@ fn highlight_element(
363 highlight_name(db, def) | HighlightModifier::Definition 363 highlight_name(db, def) | HighlightModifier::Definition
364 } 364 }
365 Some(NameClass::ConstReference(def)) => highlight_name(db, def), 365 Some(NameClass::ConstReference(def)) => highlight_name(db, def),
366 Some(NameClass::FieldShorthand { .. }) => HighlightTag::Field.into(),
366 None => highlight_name_by_syntax(name) | HighlightModifier::Definition, 367 None => highlight_name_by_syntax(name) | HighlightModifier::Definition,
367 } 368 }
368 } 369 }