mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
use extern prelude in Resolver
This fixes two bugs: - completion for paths works again - we handle extern prelude shadowing more correctly
This commit is contained in:
parent
2babbbb978
commit
58ed8ee665
5 changed files with 81 additions and 18 deletions
|
@ -186,4 +186,20 @@ mod tests {
|
|||
",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn completes_use_paths_across_crates() {
|
||||
check_reference_completion(
|
||||
"completes_use_paths_across_crates",
|
||||
"
|
||||
//- /main.rs
|
||||
use foo::<|>;
|
||||
|
||||
//- /foo/lib.rs
|
||||
pub mod bar {
|
||||
pub struct S;
|
||||
}
|
||||
",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
created: "2019-02-11T11:53:02.410665254Z"
|
||||
creator: insta@0.6.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
[
|
||||
CompletionItem {
|
||||
completion_kind: Reference,
|
||||
label: "bar",
|
||||
kind: Some(
|
||||
Module
|
||||
),
|
||||
detail: None,
|
||||
documentation: None,
|
||||
lookup: None,
|
||||
insert_text: None,
|
||||
insert_text_format: PlainText,
|
||||
source_range: [9; 9),
|
||||
text_edit: None
|
||||
}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue