fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: the size for values of type `<Self as Deref>::Target` cannot be known at compilation time 2 --> $DIR/issue-42312.rs:4:12 3 | 4LL | fn baz(_: Self::Target) where Self: Deref {} 5 | ^ doesn't have a size known at compile-time 6 | 7 = help: the trait `Sized` is not implemented for `<Self as Deref>::Target` 8 = help: unsized fn params are gated as an unstable feature 9help: consider further restricting the associated type 10 | 11LL | fn baz(_: Self::Target) where Self: Deref, <Self as Deref>::Target: Sized {} 12 | ++++++++++++++++++++++++++++++++ 13help: function arguments must have a statically known size, borrowed types always have a known size 14 | 15LL | fn baz(_: &Self::Target) where Self: Deref {} 16 | + 17 18error[E0277]: the size for values of type `(dyn ToString + 'static)` cannot be known at compilation time 19 --> $DIR/issue-42312.rs:8:10 20 | 21LL | pub fn f(_: dyn ToString) {} 22 | ^ doesn't have a size known at compile-time 23 | 24 = help: the trait `Sized` is not implemented for `(dyn ToString + 'static)` 25 = help: unsized fn params are gated as an unstable feature 26help: you can use `impl Trait` as the argument type 27 | 28LL | pub fn f(_: impl ToString) {} 29 | ~~~~ 30help: function arguments must have a statically known size, borrowed types always have a known size 31 | 32LL | pub fn f(_: &dyn ToString) {} 33 | + 34 35error: aborting due to 2 previous errors 36 37For more information about this error, try `rustc --explain E0277`.