]> git.lizzy.rs Git - rust.git/blob - src/test/ui/no_send-enum.rs
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
[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 }