Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_db/src/helpers/import_assets.rs')
-rw-r--r--crates/ide_db/src/helpers/import_assets.rs20
1 files changed, 1 insertions, 19 deletions
diff --git a/crates/ide_db/src/helpers/import_assets.rs b/crates/ide_db/src/helpers/import_assets.rs
index c037c3e0f8..319a217352 100644
--- a/crates/ide_db/src/helpers/import_assets.rs
+++ b/crates/ide_db/src/helpers/import_assets.rs
@@ -8,11 +8,10 @@ use rustc_hash::FxHashSet;
use syntax::{
ast::{self, HasName},
utils::path_to_string_stripping_turbo_fish,
- AstNode, AstToken, SyntaxNode,
+ AstNode, SyntaxNode,
};
use crate::{
- helpers::get_path_in_derive_attr,
items_locator::{self, AssocItemSearch, DEFAULT_QUERY_SEARCH_LIMIT},
RootDatabase,
};
@@ -139,23 +138,6 @@ impl ImportAssets {
})
}
- pub fn for_derive_ident(sema: &Semantics<RootDatabase>, ident: &ast::Ident) -> Option<Self> {
- let attr = ident.syntax().ancestors().find_map(ast::Attr::cast)?;
- let path = get_path_in_derive_attr(sema, &attr, ident)?;
-
- if let Some(_) = path.qualifier() {
- return None;
- }
-
- let name = NameToImport::exact_case_sensitive(path.segment()?.name_ref()?.to_string());
- let candidate_node = attr.syntax().clone();
- Some(Self {
- import_candidate: ImportCandidate::Path(PathImportCandidate { qualifier: None, name }),
- module_with_candidate: sema.scope(&candidate_node).module()?,
- candidate_node,
- })
- }
-
pub fn for_fuzzy_path(
module_with_candidate: Module,
qualifier: Option<ast::Path>,