mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add test for use as
This commit is contained in:
parent
4447019f4b
commit
aa5f6a1ee8
1 changed files with 24 additions and 0 deletions
|
@ -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]
|
#[test]
|
||||||
fn use_trees() {
|
fn use_trees() {
|
||||||
let (item_map, module_id) = item_map(
|
let (item_map, module_id) = item_map(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue