mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
17 lines
211 B
Rust
17 lines
211 B
Rust
trait Foo {
|
|
fn dummy(&self) { }
|
|
}
|
|
|
|
fn a(_x: Box<dyn Foo + Send>) {
|
|
}
|
|
|
|
fn c(x: Box<dyn Foo + Sync + Send>) {
|
|
a(x);
|
|
}
|
|
|
|
fn d(x: Box<dyn Foo>) {
|
|
a(x); //~ ERROR mismatched types [E0308]
|
|
}
|
|
|
|
fn main() { }
|