]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/not-sync.rs
1 use std
::cell
::{Cell, RefCell}
;
2 use std
::rc
::{Rc, Weak}
;
3 use std
::sync
::mpsc
::{Receiver, Sender}
;
9 //~^ ERROR `Cell<i32>` cannot be shared between threads safely [E0277]
10 test
::<RefCell
<i32>>();
11 //~^ ERROR `RefCell<i32>` cannot be shared between threads safely [E0277]
14 //~^ ERROR `Rc<i32>` cannot be shared between threads safely [E0277]
16 //~^ ERROR `std::rc::Weak<i32>` cannot be shared between threads safely [E0277]
18 test
::<Receiver
<i32>>();
19 //~^ ERROR `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely [E0277]
20 test
::<Sender
<i32>>();
21 //~^ ERROR `Sender<i32>` cannot be shared between threads safely [E0277]