2013-08-16 18:21:02 -04:00
|
|
|
// aux-build:trait_superkinds_in_metadata.rs
|
|
|
|
|
2013-08-19 17:15:25 -04:00
|
|
|
// Test for traits inheriting from the builtin kinds cross-crate.
|
|
|
|
// Mostly tests correctness of metadata.
|
|
|
|
|
2014-02-14 10:10:06 -08:00
|
|
|
extern crate trait_superkinds_in_metadata;
|
2014-03-22 00:44:26 +01:00
|
|
|
use trait_superkinds_in_metadata::{RequiresRequiresShareAndSend, RequiresShare};
|
2013-08-16 18:21:02 -04:00
|
|
|
|
|
|
|
struct X<T>(T);
|
|
|
|
|
2014-08-05 16:40:04 -07:00
|
|
|
impl <T:Sync> RequiresShare for X<T> { }
|
2013-08-16 18:21:02 -04:00
|
|
|
|
2014-09-12 10:45:39 -04:00
|
|
|
impl <T:Sync+'static> RequiresRequiresShareAndSend for X<T> { }
|
2018-06-09 16:53:36 -07:00
|
|
|
//~^ ERROR `T` cannot be sent between threads safely [E0277]
|
2013-08-16 18:21:02 -04:00
|
|
|
|
|
|
|
fn main() { }
|