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