]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/no_send-struct.rs
Merge commit '63734fcdd718cca089f84c42f3a42c0096cfd431' into sync_cg_clif-2022-05-15
[rust.git] / src / test / ui / traits / no_send-struct.rs
1 #![feature(negative_impls)]
2
3 use std::marker::Send;
4
5 struct Foo {
6     a: isize,
7 }
8
9 impl !Send for Foo {}
10
11 fn bar<T: Send>(_: T) {}
12
13 fn main() {
14     let x = Foo { a: 5 };
15     bar(x);
16     //~^ ERROR `Foo` cannot be sent between threads safely
17 }