Move reference imports filtering into to_proto layer

This commit is contained in:
Lukas Wirth 2022-09-13 14:47:26 +02:00
parent f64c95600c
commit cadb01c315
7 changed files with 45 additions and 50 deletions

View file

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