Add autoimport test with inner items

This commit is contained in:
Jonas Schievink 2021-04-19 19:53:29 +02:00
parent 59630977a5
commit ec05186378

View File

@ -934,4 +934,37 @@ fn main() {
", ",
); );
} }
#[test]
fn inner_items() {
check_assist(
auto_import,
r#"
mod baz {
pub struct Foo {}
}
mod bar {
fn bar() {
Foo$0;
println!("Hallo");
}
}
"#,
r#"
mod baz {
pub struct Foo {}
}
mod bar {
use crate::baz::Foo;
fn bar() {
Foo;
println!("Hallo");
}
}
"#,
);
}
} }