mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
internal: Enforce Resolver to always have a module scope
This commit is contained in:
parent
ef92453dfe
commit
75689f2ad8
71 changed files with 360 additions and 398 deletions
|
@ -185,7 +185,7 @@ fn import_edits(
|
|||
_ => return None,
|
||||
};
|
||||
let path =
|
||||
ctx.module?.find_use_path_prefixed(ctx.db, item, ctx.config.insert_use.prefix_kind)?;
|
||||
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