mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
fix: Partially fix ide_db::search
for crate roots
This commit is contained in:
parent
2ca3834c9f
commit
5206946674
4 changed files with 118 additions and 34 deletions
|
@ -378,7 +378,22 @@ struct Foo;
|
|||
fn test_hl_self_in_crate_root() {
|
||||
check(
|
||||
r#"
|
||||
use self$0;
|
||||
use crate$0;
|
||||
//^^^^^
|
||||
use self;
|
||||
//^^^^
|
||||
mod __ {
|
||||
use super;
|
||||
//^^^^^
|
||||
}
|
||||
"#,
|
||||
);
|
||||
check(
|
||||
r#"
|
||||
//- /main.rs crate:main deps:lib
|
||||
use lib$0;
|
||||
//^^^
|
||||
//- /lib.rs crate:lib
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue