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