mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +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
|
@ -124,7 +124,7 @@ fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::MissingFields) -> Option<Vec<Ass
|
|||
let type_path = current_module?.find_use_path(
|
||||
ctx.sema.db,
|
||||
item_for_path_search(ctx.sema.db, item_in_ns)?,
|
||||
ctx.config.prefer_core,
|
||||
ctx.config.prefer_no_std,
|
||||
)?;
|
||||
|
||||
use_trivial_constructor(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue