]> git.lizzy.rs Git - rust.git/blob - tests/ui/no_send-enum.rs
Rollup merge of #107091 - clubby789:infer-ftl-missing-dollar, r=compiler-errors
[rust.git] / tests / 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 }