]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-42312.stderr
New upstream version 1.49.0~beta.4+dfsg1
[rustc.git] / src / test / ui / issues / issue-42312.stderr
CommitLineData
1b1a35ee 1error[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 |
4LL | 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
9help: consider further restricting the associated type
10 |
1b1a35ee
XL
11LL | fn baz(_: Self::Target) where Self: Deref, <Self as Deref>::Target: Sized {}
12 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3dfed10e
XL
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 | ^
8faf50e0 17
1b1a35ee 18error[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 21LL | 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
26help: function arguments must have a statically known size, borrowed types always have a known size
27 |
28LL | pub fn f(_: &dyn ToString) {}
29 | ^
8faf50e0
XL
30
31error: aborting due to 2 previous errors
32
33For more information about this error, try `rustc --explain E0277`.