Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-ssr/src/matching.rs')
-rw-r--r--crates/ide-ssr/src/matching.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide-ssr/src/matching.rs b/crates/ide-ssr/src/matching.rs
index cfda1c692a..cf7e7e08bc 100644
--- a/crates/ide-ssr/src/matching.rs
+++ b/crates/ide-ssr/src/matching.rs
@@ -6,7 +6,7 @@ use crate::{
resolving::{ResolvedPattern, ResolvedRule, UfcsCallInfo},
SsrMatches,
};
-use hir::Semantics;
+use hir::{ImportPathConfig, Semantics};
use ide_db::{base_db::FileRange, FxHashMap};
use std::{cell::Cell, iter::Peekable};
use syntax::{
@@ -663,10 +663,10 @@ impl Match {
.module();
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, true).ok_or_else(|| {
- match_error!("Failed to render template path `{}` at match location")
- })?;
+ let cfg = ImportPathConfig { prefer_no_std: false, prefer_prelude: true };
+ let mod_path = module.find_path(sema.db, module_def, cfg).ok_or_else(|| {
+ match_error!("Failed to render template path `{}` at match location")
+ })?;
self.rendered_template_paths.insert(path.clone(), mod_path);
}
}