@@ -6,12 +6,15 @@ LL | fn baz(_: Self::Target) where Self: Deref {}
66 |
77 = help: the trait `std::marker::Sized` is not implemented for `<Self as std::ops::Deref>::Target`
88 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
9- = note: all function arguments must have a statically known size
109 = help: unsized locals are gated as an unstable feature
1110help: consider further restricting the associated type
1211 |
1312LL | fn baz(_: Self::Target) where Self: Deref, <Self as std::ops::Deref>::Target: std::marker::Sized {}
1413 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14+ help: function arguments must have a statically known size, borrowed types always have a known size
15+ |
16+ LL | fn baz(_: &Self::Target) where Self: Deref {}
17+ | ^
1518
1619error[E0277]: the size for values of type `(dyn std::string::ToString + 'static)` cannot be known at compilation time
1720 --> $DIR/issue-42312.rs:8:10
@@ -21,8 +24,11 @@ LL | pub fn f(_: dyn ToString) {}
2124 |
2225 = help: the trait `std::marker::Sized` is not implemented for `(dyn std::string::ToString + 'static)`
2326 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
24- = note: all function arguments must have a statically known size
2527 = help: unsized locals are gated as an unstable feature
28+ help: function arguments must have a statically known size, borrowed types always have a known size
29+ |
30+ LL | pub fn f(_: &dyn ToString) {}
31+ | ^
2632
2733error: aborting due to 2 previous errors
2834
0 commit comments