]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-16560.rs
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-16560.rs
1 // run-pass
2 #![allow(unused_variables)]
3 // ignore-emscripten no threads support
4
5 use std::thread;
6 use std::mem;
7
8 fn main() {
9     let y = 0u8;
10     let closure = move |x: u8| y + x;
11
12     // Check that both closures are capturing by value
13     assert_eq!(1, mem::size_of_val(&closure));
14
15     thread::spawn(move|| {
16         let ok = closure;
17     }).join().ok().unwrap();
18 }