fix: Partially fix ide_db::search for crate roots

This commit is contained in:
Lukas Wirth 2021-12-20 17:48:47 +01:00
parent 2ca3834c9f
commit 5206946674
4 changed files with 118 additions and 34 deletions

View file

@ -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
"#,
);
}