summaryrefslogtreecommitdiffstats
path: root/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.rs
blob: e716489c24a9feb07f7adf1e7e9c2da451c22898 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Test for traits that inherit from multiple builtin kinds at once,
// testing that all such kinds must be present on implementing types.

trait Foo : Send+Sync { }

impl <T: Sync+'static> Foo for (T,) { }
//~^ ERROR `T` cannot be sent between threads safely [E0277]

impl <T: Send> Foo for (T,T) { }
//~^ ERROR `T` cannot be shared between threads safely [E0277]

impl <T: Send+Sync> Foo for (T,T,T) { } // (ok)

fn main() { }