summaryrefslogtreecommitdiffstats
path: root/tests/ui/capture1.rs
blob: 2938c084537d03d92c01fa9837290dec1d42e880 (plain)
1
2
3
4
5
6
// error-pattern: can't capture dynamic environment in a fn item

fn main() {
    let bar: isize = 5;
    fn foo() -> isize { return bar; }
}