mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Add test that merges inner and outer names
This commit is contained in:
parent
d62c9c6c63
commit
ec4a1dc297
1 changed files with 25 additions and 0 deletions
|
@ -45,3 +45,28 @@ fn outer() {
|
|||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn merge_namespaces() {
|
||||
check_at(
|
||||
r#"
|
||||
//- /lib.rs
|
||||
struct name {}
|
||||
fn outer() {
|
||||
fn name() {}
|
||||
|
||||
use name as imported; // should import both `name`s
|
||||
|
||||
$0
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
block scope
|
||||
imported: t v
|
||||
name: v
|
||||
crate
|
||||
name: t
|
||||
outer: v
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue