mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Move reference imports filtering into to_proto layer
This commit is contained in:
parent
f64c95600c
commit
cadb01c315
7 changed files with 45 additions and 50 deletions
|
@ -377,6 +377,7 @@ mod tests {
|
|||
match it {
|
||||
ReferenceCategory::Read => "read",
|
||||
ReferenceCategory::Write => "write",
|
||||
ReferenceCategory::Import => "import",
|
||||
}
|
||||
.to_string()
|
||||
}),
|
||||
|
@ -423,12 +424,12 @@ struct Foo;
|
|||
check(
|
||||
r#"
|
||||
use crate$0;
|
||||
//^^^^^
|
||||
//^^^^^ import
|
||||
use self;
|
||||
//^^^^
|
||||
//^^^^ import
|
||||
mod __ {
|
||||
use super;
|
||||
//^^^^^
|
||||
//^^^^^ import
|
||||
}
|
||||
"#,
|
||||
);
|
||||
|
@ -436,7 +437,7 @@ mod __ {
|
|||
r#"
|
||||
//- /main.rs crate:main deps:lib
|
||||
use lib$0;
|
||||
//^^^
|
||||
//^^^ import
|
||||
//- /lib.rs crate:lib
|
||||
"#,
|
||||
);
|
||||
|
@ -450,7 +451,7 @@ use lib$0;
|
|||
mod foo;
|
||||
//- /foo.rs
|
||||
use self$0;
|
||||
// ^^^^
|
||||
// ^^^^ import
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue