about summary refs log tree commit diff
path: root/tests/ui/resolve/issue-104700-inner_scope.rs
blob: fb77ab2626b5f961781177c26cb0c07d7896647c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fn main() {
    let foo = 1;
    {
        let bar = 2;
        let test_func = |x| x > 3;
    }
    if bar == 2 { //~ ERROR cannot find value
        println!("yes");
    }
    {
        let baz = 3;
        struct S;
    }
    if baz == 3 { //~ ERROR cannot find value
        println!("yes");
    }
    test_func(1); //~ ERROR cannot find function
}