rust/tests/ui/extern/issue-18819.rs
2024-02-13 18:08:25 -03:00

18 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
}