Restructure find_path into a separate functions for modules and non-module items
Also renames `prefer_core` imports config to `prefer_no_std` and changes the behavior of no_std path searching by preferring `core` paths `over` alloc
This commit is contained in:
@@ -178,7 +178,7 @@ fn import_edits(ctx: &CompletionContext<'_>, requires: &[GreenNode]) -> Option<V
|
||||
ctx.db,
|
||||
item,
|
||||
ctx.config.insert_use.prefix_kind,
|
||||
ctx.config.prefer_core,
|
||||
ctx.config.prefer_no_std,
|
||||
)?;
|
||||
Some((path.len() > 1).then(|| LocatedImport::new(path.clone(), item, item, None)))
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user