rust/tests/ui/resolve/issue-104700-inner_scope.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
225 B
Rust
Raw Normal View History

fn main() {
let foo = 1;
{
let bar = 2;
let test_func = |x| x > 3;
}
if bar == 2 { //~ ERROR cannot find value
println!("yes");
}
test_func(1); //~ ERROR cannot find function
}