]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/trait-bounds-cant-coerce.rs
Auto merge of #76110 - FedericoPonzi:convert-openoptions-cint, r=JoshTriplett
[rust.git] / src / test / ui / mismatched_types / trait-bounds-cant-coerce.rs
1 trait Foo {
2     fn dummy(&self) { }
3 }
4
5 fn a(_x: Box<dyn Foo + Send>) {
6 }
7
8 fn c(x: Box<dyn Foo + Sync + Send>) {
9     a(x);
10 }
11
12 fn d(x: Box<dyn Foo>) {
13     a(x); //~ ERROR mismatched types [E0308]
14 }
15
16 fn main() { }