mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
17 lines
246 B
Rust
17 lines
246 B
Rust
//@ 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() {}
|