rust/tests/ui/capture1.rs

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

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; }
}