Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/term_search.rs')
-rw-r--r--crates/ide-assists/src/handlers/term_search.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ide-assists/src/handlers/term_search.rs b/crates/ide-assists/src/handlers/term_search.rs
index 66671c934c..e10897b3be 100644
--- a/crates/ide-assists/src/handlers/term_search.rs
+++ b/crates/ide-assists/src/handlers/term_search.rs
@@ -52,8 +52,13 @@ pub(crate) fn term_search(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option<
let paths = paths
.into_iter()
.filter_map(|path| {
- path.gen_source_code(&scope, &mut formatter, ctx.config.import_path_config(), edition)
- .ok()
+ path.gen_source_code(
+ &scope,
+ &mut formatter,
+ ctx.config.import_path_config(),
+ scope.krate().to_display_target(ctx.db()),
+ )
+ .ok()
})
.unique();