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.
|
|
|
|
|
2014-02-14 12:10:06 -06:00
|
|
|
extern crate trait_superkinds_in_metadata;
|
2014-03-21 18:44:26 -05:00
|
|
|
use trait_superkinds_in_metadata::{RequiresRequiresShareAndSend, RequiresShare};
|
2013-08-16 17:21:02 -05:00
|
|
|
|
|
|
|
struct X<T>(T);
|
|
|
|
|
2014-08-05 18:40:04 -05:00
|
|
|
impl <T:Sync> RequiresShare for X<T> { }
|
2013-08-16 17:21:02 -05:00
|
|
|
|
2014-09-12 09:45:39 -05:00
|
|
|
impl <T:Sync+'static> RequiresRequiresShareAndSend for X<T> { }
|
2018-06-09 18:53:36 -05:00
|
|
|
//~^ ERROR `T` cannot be sent between threads safely [E0277]
|
2013-08-16 17:21:02 -05:00
|
|
|
|
|
|
|
fn main() { }
|