Add test for use as

This commit is contained in:
Florian Diebold 2019-02-02 00:17:48 +01:00
parent 4447019f4b
commit aa5f6a1ee8

View file

@ -90,6 +90,30 @@ fn item_map_smoke_test() {
);
}
#[test]
fn use_as() {
let (item_map, module_id) = item_map(
"
//- /lib.rs
mod foo;
use crate::foo::Baz as Foo;
<|>
//- /foo/mod.rs
pub struct Baz;
",
);
check_module_item_map(
&item_map,
module_id,
"
Foo: t v
foo: t
",
);
}
#[test]
fn use_trees() {
let (item_map, module_id) = item_map(