mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
fix: Fix find_path not respecting non-std preference config correctly
This commit is contained in:
parent
56f63dfd8a
commit
24c0e0bd48
11 changed files with 124 additions and 104 deletions
|
@ -10,7 +10,6 @@ mod snippet;
|
|||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
use hir::ImportPathConfig;
|
||||
use ide_db::{
|
||||
helpers::mod_path_to_ast,
|
||||
imports::{
|
||||
|
@ -249,11 +248,7 @@ pub fn resolve_completion_edits(
|
|||
let new_ast = scope.clone_for_update();
|
||||
let mut import_insert = TextEdit::builder();
|
||||
|
||||
let cfg = ImportPathConfig {
|
||||
prefer_no_std: config.prefer_no_std,
|
||||
prefer_prelude: config.prefer_prelude,
|
||||
prefer_absolute: config.prefer_absolute,
|
||||
};
|
||||
let cfg = config.import_path_config();
|
||||
|
||||
imports.into_iter().for_each(|(full_import_path, imported_name)| {
|
||||
let items_with_name = items_locator::items_with_name(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue