mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
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:
parent
b1a4ba3e84
commit
a8ecaa1979
31 changed files with 322 additions and 231 deletions
|
@ -152,7 +152,7 @@ pub(crate) fn extract_function(acc: &mut Assists, ctx: &AssistContext<'_>) -> Op
|
|||
ctx.sema.db,
|
||||
ModuleDef::from(control_flow_enum),
|
||||
ctx.config.insert_use.prefix_kind,
|
||||
ctx.config.prefer_core,
|
||||
ctx.config.prefer_no_std,
|
||||
);
|
||||
|
||||
if let Some(mod_path) = mod_path {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue