rust/tests/ui/traits/alias/cross-crate.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
364 B
Rust
Raw Normal View History

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