mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-19 03:28:36 +00:00
Fix IDE layer not correctly resolving opt-in extern crates
This commit is contained in:
parent
727555fc04
commit
597d8e837a
3 changed files with 18 additions and 7 deletions
|
|
@ -874,18 +874,23 @@ pub fn block_comments2() {}
|
|||
fn test_extern_crate() {
|
||||
check_highlighting(
|
||||
r#"
|
||||
//- /main.rs crate:main deps:std,alloc,test extern-prelude:std,alloc
|
||||
//- /main.rs crate:main deps:std,alloc,test,proc_macro extern-prelude:std,alloc
|
||||
extern crate self as this;
|
||||
extern crate std;
|
||||
extern crate alloc as abc;
|
||||
extern crate unresolved as definitely_unresolved;
|
||||
extern crate unresolved as _;
|
||||
extern crate test as opt_in_crate;
|
||||
extern crate test as _;
|
||||
extern crate proc_macro;
|
||||
//- /std/lib.rs crate:std
|
||||
pub struct S;
|
||||
//- /alloc/lib.rs crate:alloc
|
||||
pub struct A;
|
||||
//- /test/lib.rs crate:test
|
||||
pub struct T;
|
||||
//- /proc_macro/lib.rs crate:proc_macro
|
||||
pub struct ProcMacro;
|
||||
"#,
|
||||
expect_file!["./test_data/highlight_extern_crate.html"],
|
||||
false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue