mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
fix: Complete functions and methods from block level impls
This commit is contained in:
parent
dbd5a70ea3
commit
d7a544e69a
19 changed files with 160 additions and 72 deletions
|
@ -185,11 +185,8 @@ fn import_edits(
|
|||
hir::PathResolution::Def(def) => def.into(),
|
||||
_ => return None,
|
||||
};
|
||||
let path = ctx.scope.module()?.find_use_path_prefixed(
|
||||
ctx.db,
|
||||
item,
|
||||
ctx.config.insert_use.prefix_kind,
|
||||
)?;
|
||||
let path =
|
||||
ctx.module?.find_use_path_prefixed(ctx.db, item, ctx.config.insert_use.prefix_kind)?;
|
||||
Some((path.len() > 1).then(|| ImportEdit {
|
||||
import: LocatedImport::new(path.clone(), item, item, None),
|
||||
scope: import_scope.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue