about summary refs log tree commit diff
path: root/tests/ui/rfcs/rfc-0000-never_patterns/always-read-in-closure-capture.rs
blob: 3c4cd57ec24b502ff02f458aad3e35b9f458d91b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ check-pass

// Make sure that the closure captures `s` so it can perform a read of `s`.

#![feature(never_patterns)]
#![allow(incomplete_features)]

enum Void {}

fn by_value(s: Void) {
    move || {
        let ! = s;
    };
}

fn main() {}