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:
Lukas Wirth 2022-09-13 15:09:40 +02:00
parent b1a4ba3e84
commit a8ecaa1979
31 changed files with 322 additions and 231 deletions

View file

@ -150,7 +150,7 @@ pub struct DiagnosticsConfig {
pub expr_fill_default: ExprFillDefaultMode,
// FIXME: We may want to include a whole `AssistConfig` here
pub insert_use: InsertUseConfig,
pub prefer_core: bool,
pub prefer_no_std: bool,
}
impl DiagnosticsConfig {
@ -171,7 +171,7 @@ impl DiagnosticsConfig {
group: false,
skip_glob_imports: false,
},
prefer_core: false,
prefer_no_std: false,
}
}
}