fix: Fix general find-path inconsistencies

This commit is contained in:
Lukas Wirth 2024-05-22 13:49:56 +02:00
parent 21ec8f5238
commit c88b421853
32 changed files with 242 additions and 193 deletions

View file

@ -122,7 +122,7 @@ fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::MissingFields) -> Option<Vec<Ass
let expr = (|| -> Option<ast::Expr> {
let item_in_ns = hir::ItemInNs::from(hir::ModuleDef::from(ty.as_adt()?));
let type_path = current_module?.find_use_path(
let type_path = current_module?.find_path(
ctx.sema.db,
item_for_path_search(ctx.sema.db, item_in_ns)?,
ctx.config.prefer_no_std,