aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists')
-rw-r--r--crates/ra_assists/src/handlers/add_turbo_fish.rs2
-rw-r--r--crates/ra_assists/src/utils.rs2
2 files changed, 2 insertions, 2 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,
diff --git a/crates/ra_assists/src/utils.rs b/crates/ra_assists/src/utils.rs
index 54d5678d1..0de6fdf3f 100644
--- a/crates/ra_assists/src/utils.rs
+++ b/crates/ra_assists/src/utils.rs
@@ -257,7 +257,7 @@ pub use prelude::*;
257 .find(|dep| &dep.name.to_string() == std_crate)? 257 .find(|dep| &dep.name.to_string() == std_crate)?
258 .krate; 258 .krate;
259 259
260 let mut module = std_crate.root_module(db)?; 260 let mut module = std_crate.root_module(db);
261 for segment in path { 261 for segment in path {
262 module = module.children(db).find_map(|child| { 262 module = module.children(db).find_map(|child| {
263 let name = child.name(db)?; 263 let name = child.name(db)?;