]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/trait-bounds-cant-coerce.rs
Auto merge of #106171 - compiler-errors:consolidate-extract_callable_info, r=estebank...
[rust.git] / tests / 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() { }