rust/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.rs

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

17 lines
478 B
Rust
Raw Normal View History

2013-08-16 17:21:02 -05:00
// aux-build:trait_superkinds_in_metadata.rs
2013-08-19 16:15:25 -05:00
// Test for traits inheriting from the builtin kinds cross-crate.
// Mostly tests correctness of metadata.
extern crate trait_superkinds_in_metadata;
use trait_superkinds_in_metadata::{RequiresRequiresShareAndSend, RequiresShare};
2013-08-16 17:21:02 -05:00
struct X<T>(T);
impl <T:Sync> RequiresShare for X<T> { }
2013-08-16 17:21:02 -05:00
impl <T:Sync+'static> RequiresRequiresShareAndSend for X<T> { }
//~^ ERROR `T` cannot be sent between threads safely [E0277]
2013-08-16 17:21:02 -05:00
fn main() { }