rust/tests/ui/methods/issues/issue-61525.rs
2023-01-11 09:32:08 +00:00

21 lines
387 B
Rust

pub trait Example {
fn query<Q>(self, q: Q);
}
impl Example for i32 {
fn query<Q>(self, _: Q) {
unimplemented!()
}
}
mod nested {
use super::Example;
fn example() {
1.query::<dyn ToString>("")
//~^ ERROR the size for values of type `dyn ToString` cannot be known at compilation time
//~| ERROR mismatched types
}
}
fn main() {}