mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Add config for preferring / ignoring prelude modules in find_path
This commit is contained in:
parent
801a887954
commit
ba61766217
36 changed files with 260 additions and 54 deletions
|
@ -651,7 +651,7 @@ impl Match {
|
|||
for (path, resolved_path) in &template.resolved_paths {
|
||||
if let hir::PathResolution::Def(module_def) = resolved_path.resolution {
|
||||
let mod_path =
|
||||
module.find_use_path(sema.db, module_def, false).ok_or_else(|| {
|
||||
module.find_use_path(sema.db, module_def, false, true).ok_or_else(|| {
|
||||
match_error!("Failed to render template path `{}` at match location")
|
||||
})?;
|
||||
self.rendered_template_paths.insert(path.clone(), mod_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue