Add config to unconditionally prefer core imports over std
Fixes https://github.com/rust-lang/rust-analyzer/issues/12979
This commit is contained in:
@@ -173,6 +173,7 @@ impl<'a> Ctx<'a> {
|
||||
let found_path = self.target_module.find_use_path(
|
||||
self.source_scope.db.upcast(),
|
||||
hir::ModuleDef::Trait(trait_ref),
|
||||
false,
|
||||
)?;
|
||||
match ast::make::ty_path(mod_path_to_ast(&found_path)) {
|
||||
ast::Type::PathType(path_ty) => Some(path_ty),
|
||||
@@ -209,7 +210,7 @@ impl<'a> Ctx<'a> {
|
||||
}
|
||||
|
||||
let found_path =
|
||||
self.target_module.find_use_path(self.source_scope.db.upcast(), def)?;
|
||||
self.target_module.find_use_path(self.source_scope.db.upcast(), def, false)?;
|
||||
let res = mod_path_to_ast(&found_path).clone_for_update();
|
||||
if let Some(args) = path.segment().and_then(|it| it.generic_arg_list()) {
|
||||
if let Some(segment) = res.segment() {
|
||||
|
||||
Reference in New Issue
Block a user