]> git.lizzy.rs Git - rust.git/blob - src/test/ui/methods/issues/issue-61525.rs
move an `assert!` to the right place
[rust.git] / src / test / ui / methods / issues / issue-61525.rs
1 pub trait Example {
2     fn query<Q>(self, q: Q);
3 }
4
5 impl Example for i32 {
6     fn query<Q>(self, _: Q) {
7         unimplemented!()
8     }
9 }
10
11 mod nested {
12     use super::Example;
13     fn example() {
14         1.query::<dyn ToString>("")
15         //~^ ERROR the size for values of type `dyn ToString` cannot be known at compilation time
16         //~| ERROR mismatched types
17     }
18 }
19
20 fn main() {}