Add test for nameres in nested blocks

This commit is contained in:
Jonas Schievink 2021-01-21 16:42:56 +01:00
parent 47a70aadce
commit 4e603b7947

View file

@ -70,3 +70,32 @@ fn outer() {
"#]],
);
}
#[test]
fn nested_blocks() {
check_at(
r#"
//- /lib.rs
fn outer() {
struct inner1 {}
fn inner() {
use inner1;
use outer;
fn inner2() {}
$0
}
}
"#,
expect![[r#"
block scope
inner1: t
inner2: v
outer: v
block scope
inner: v
inner1: t
crate
outer: v
"#]],
);
}