aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/add_turbo_fish.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-15 16:39:35 +0100
committerGitHub <[email protected]>2020-10-15 16:39:35 +0100
commitd8c6e192f7b35c57e7ff9d167ab10db8a8cd90b4 (patch)
tree460a055c661b2c44ffef28b920f1a59bdbfd5017 /crates/assists/src/handlers/add_turbo_fish.rs
parent7fadc78ebb43b0eb9b6ccf314e29bdd23717542f (diff)
parentc5868a48795c899d43fde773091f0b133bee0a59 (diff)
Merge #6243
6243: Clarify classification API r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/assists/src/handlers/add_turbo_fish.rs')
-rw-r--r--crates/assists/src/handlers/add_turbo_fish.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/assists/src/handlers/add_turbo_fish.rs b/crates/assists/src/handlers/add_turbo_fish.rs
index f4f997d8e..e3d84d698 100644
--- a/crates/assists/src/handlers/add_turbo_fish.rs
+++ b/crates/assists/src/handlers/add_turbo_fish.rs
@@ -1,4 +1,4 @@
1use ide_db::defs::{classify_name_ref, Definition, NameRefClass}; 1use ide_db::defs::{Definition, NameRefClass};
2use syntax::{ast, AstNode, SyntaxKind, T}; 2use syntax::{ast, AstNode, SyntaxKind, T};
3use test_utils::mark; 3use test_utils::mark;
4 4
@@ -39,7 +39,7 @@ pub(crate) fn add_turbo_fish(acc: &mut Assists, ctx: &AssistContext) -> Option<(
39 return None; 39 return None;
40 } 40 }
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 NameRefClass::classify(&ctx.sema, &name_ref)? {
43 NameRefClass::Definition(def) => def, 43 NameRefClass::Definition(def) => def,
44 NameRefClass::ExternCrate(_) | NameRefClass::FieldShorthand { .. } => return None, 44 NameRefClass::ExternCrate(_) | NameRefClass::FieldShorthand { .. } => return None,
45 }; 45 };