1 error[E0277]: the size for values of type `dyn ToString` cannot be known at compilation time
2 --> $DIR/issue-61525.rs:14:33
4 LL | 1.query::<dyn ToString>("")
5 | ----- ^^ doesn't have a size known at compile-time
7 | required by a bound introduced by this call
9 = help: the trait `Sized` is not implemented for `dyn ToString`
10 note: required by a bound in `Example::query`
11 --> $DIR/issue-61525.rs:2:14
13 LL | fn query<Q>(self, q: Q);
14 | ^ required by this bound in `Example::query`
15 help: consider relaxing the implicit `Sized` restriction
17 LL | fn query<Q: ?Sized>(self, q: Q);
20 error[E0308]: mismatched types
21 --> $DIR/issue-61525.rs:14:33
23 LL | 1.query::<dyn ToString>("")
24 | --------------------- ^^ expected trait object `dyn ToString`, found `&str`
26 | arguments to this function are incorrect
28 = note: expected trait object `dyn ToString`
29 found reference `&'static str`
30 note: associated function defined here
31 --> $DIR/issue-61525.rs:2:8
33 LL | fn query<Q>(self, q: Q);
36 error: aborting due to 2 previous errors
38 Some errors have detailed explanations: E0277, E0308.
39 For more information about an error, try `rustc --explain E0277`.