rust/tests/ui/capture1.rs
2023-01-11 09:32:08 +00:00

7 lines
142 B
Rust

// error-pattern: can't capture dynamic environment in a fn item
fn main() {
let bar: isize = 5;
fn foo() -> isize { return bar; }
}