rust/tests/ui/capture1.rs

7 lines
142 B
Rust
Raw Normal View History

2017-12-19 21:53:39 -06:00
// error-pattern: can't capture dynamic environment in a fn item
fn main() {
let bar: isize = 5;
fn foo() -> isize { return bar; }
}