diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-10 00:16:58 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-10 00:16:58 +0100 |
commit | 7a03f05eac4ff1e9ca4ceeced54ce06892bd30b8 (patch) | |
tree | 2a8074952398d7d72d8a83ddda35785c4821e20b /crates/ra_assists/src/handlers | |
parent | b1cb4ac13d5b625dd497692b6396287a30ff12e2 (diff) | |
parent | bf9b4578bbe038501ef7c337e22b448de477f61c (diff) |
Merge #5692
5692: Add support for extern crate r=jonas-schievink a=Nashenas88
This adds syntax highlighting, hover and goto def functionality for extern crate.
Fixes #5690
Co-authored-by: Paul Daniel Faria <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/handlers')
-rw-r--r-- | crates/ra_assists/src/handlers/add_turbo_fish.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/add_turbo_fish.rs b/crates/ra_assists/src/handlers/add_turbo_fish.rs index 0c565e89a..537322a72 100644 --- a/crates/ra_assists/src/handlers/add_turbo_fish.rs +++ b/crates/ra_assists/src/handlers/add_turbo_fish.rs | |||
@@ -41,7 +41,7 @@ pub(crate) fn add_turbo_fish(acc: &mut Assists, ctx: &AssistContext) -> Option<( | |||
41 | let name_ref = ast::NameRef::cast(ident.parent())?; | 41 | let name_ref = ast::NameRef::cast(ident.parent())?; |
42 | let def = match classify_name_ref(&ctx.sema, &name_ref)? { | 42 | let def = match classify_name_ref(&ctx.sema, &name_ref)? { |
43 | NameRefClass::Definition(def) => def, | 43 | NameRefClass::Definition(def) => def, |
44 | NameRefClass::FieldShorthand { .. } => return None, | 44 | NameRefClass::ExternCrate(_) | NameRefClass::FieldShorthand { .. } => return None, |
45 | }; | 45 | }; |
46 | let fun = match def { | 46 | let fun = match def { |
47 | Definition::ModuleDef(hir::ModuleDef::Function(it)) => it, | 47 | Definition::ModuleDef(hir::ModuleDef::Function(it)) => it, |