]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0277]: the size for values of type `<Self as Deref>::Target` cannot be known at compilation time |
74b04a01 | 2 | --> $DIR/issue-42312.rs:4:12 |
8faf50e0 XL |
3 | | |
4 | LL | fn baz(_: Self::Target) where Self: Deref {} | |
f9f354fc | 5 | | ^ doesn't have a size known at compile-time |
8faf50e0 | 6 | | |
1b1a35ee | 7 | = help: the trait `Sized` is not implemented for `<Self as Deref>::Target` |
29967ef6 | 8 | = help: unsized fn params are gated as an unstable feature |
f9f354fc XL |
9 | help: consider further restricting the associated type |
10 | | | |
1b1a35ee XL |
11 | LL | fn baz(_: Self::Target) where Self: Deref, <Self as Deref>::Target: Sized {} |
12 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
3dfed10e XL |
13 | help: function arguments must have a statically known size, borrowed types always have a known size |
14 | | | |
15 | LL | fn baz(_: &Self::Target) where Self: Deref {} | |
16 | | ^ | |
8faf50e0 | 17 | |
1b1a35ee | 18 | error[E0277]: the size for values of type `(dyn ToString + 'static)` cannot be known at compilation time |
74b04a01 | 19 | --> $DIR/issue-42312.rs:8:10 |
8faf50e0 | 20 | | |
dc9dc135 | 21 | LL | pub fn f(_: dyn ToString) {} |
74b04a01 | 22 | | ^ doesn't have a size known at compile-time |
8faf50e0 | 23 | | |
1b1a35ee | 24 | = help: the trait `Sized` is not implemented for `(dyn ToString + 'static)` |
29967ef6 | 25 | = help: unsized fn params are gated as an unstable feature |
3dfed10e XL |
26 | help: function arguments must have a statically known size, borrowed types always have a known size |
27 | | | |
28 | LL | pub fn f(_: &dyn ToString) {} | |
29 | | ^ | |
8faf50e0 XL |
30 | |
31 | error: aborting due to 2 previous errors | |
32 | ||
33 | For more information about this error, try `rustc --explain E0277`. |