rust/tests/ui/capture1.rs

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

7 lines
143 B
Rust
Raw Normal View History

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