mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
19 lines
214 B
Rust
19 lines
214 B
Rust
trait Foo {
|
|
type Item;
|
|
}
|
|
|
|
struct X;
|
|
|
|
impl Foo for X {
|
|
type Item = bool;
|
|
}
|
|
|
|
fn print_x(_: &dyn Foo<Item=bool>, extra: &str) {
|
|
println!("{}", extra);
|
|
}
|
|
|
|
fn main() {
|
|
print_x(X);
|
|
//~^ ERROR E0061
|
|
}
|