]> git.lizzy.rs Git - rust.git/blob - src/test/ui/no_send-enum.rs
move an `assert!` to the right place
[rust.git] / src / test / ui / no_send-enum.rs
1 #![feature(negative_impls)]
2
3 use std::marker::Send;
4
5 struct NoSend;
6 impl !Send for NoSend {}
7
8 enum Foo {
9     A(NoSend)
10 }
11
12 fn bar<T: Send>(_: T) {}
13
14 fn main() {
15     let x = Foo::A(NoSend);
16     bar(x);
17     //~^ ERROR `NoSend` cannot be sent between threads safely
18 }