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