]> git.lizzy.rs Git - rust.git/blob - src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / builtin-superkinds / builtin-superkinds-double-superkind.rs
1 // Test for traits that inherit from multiple builtin kinds at once,
2 // testing that all such kinds must be present on implementing types.
3
4 trait Foo : Send+Sync { }
5
6 impl <T: Sync+'static> Foo for (T,) { }
7 //~^ ERROR `T` cannot be sent between threads safely [E0277]
8
9 impl <T: Send> Foo for (T,T) { }
10 //~^ ERROR `T` cannot be shared between threads safely [E0277]
11
12 impl <T: Send+Sync> Foo for (T,T,T) { } // (ok)
13
14 fn main() { }