2021-02-08 16:15:45 -06:00
|
|
|
// aux-build:send_sync.rs
|
2019-01-10 15:56:05 -06:00
|
|
|
|
|
|
|
#![feature(trait_alias)]
|
|
|
|
|
2021-02-08 16:15:45 -06:00
|
|
|
extern crate send_sync;
|
2019-01-10 15:56:05 -06:00
|
|
|
|
|
|
|
use std::rc::Rc;
|
2021-02-08 16:15:45 -06:00
|
|
|
use send_sync::SendSync;
|
2019-01-10 15:56:05 -06:00
|
|
|
|
|
|
|
fn use_alias<T: SendSync>() {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
use_alias::<u32>();
|
|
|
|
use_alias::<Rc<u32>>();
|
2020-09-02 02:40:56 -05:00
|
|
|
//~^ ERROR `Rc<u32>` cannot be sent between threads safely [E0277]
|
|
|
|
//~^^ ERROR `Rc<u32>` cannot be shared between threads safely [E0277]
|
2019-01-10 15:56:05 -06:00
|
|
|
}
|