]> git.proxmox.com Git - rustc.git/blame - src/test/ui/unsized/unsized-bare-typaram.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / unsized / unsized-bare-typaram.stderr
CommitLineData
8faf50e0 1error[E0277]: the size for values of type `T` cannot be known at compilation time
e1599b0c 2 --> $DIR/unsized-bare-typaram.rs:2:29
8faf50e0 3 |
b7449926 4LL | fn foo<T: ?Sized>() { bar::<T>() }
74b04a01 5 | - ^ doesn't have a size known at compile-time
e74abb32 6 | |
cdc7bbd5 7 | this type parameter needs to be `std::marker::Sized`
94222f64
XL
8 |
9note: required by a bound in `bar`
10 --> $DIR/unsized-bare-typaram.rs:1:8
11 |
12LL | fn bar<T: Sized>() { }
13 | ^ required by this bound in `bar`
14help: consider removing the `?Sized` bound to make the type parameter `Sized`
15 |
16LL - fn foo<T: ?Sized>() { bar::<T>() }
17LL + fn foo<T>() { bar::<T>() }
923072b8 18 |
8faf50e0
XL
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0277`.