7376: Add test for nameres in nested blocks r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
bors[bot] 2021-01-21 15:43:53 +00:00 committed by GitHub
commit 235583f3fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
"#]],
);
}