fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
736 B22 linesraw
1error[E0277]: the size for values of type `T` cannot be known at compilation time
2  --> $DIR/unsized-bare-typaram.rs:2:29
3   |
4LL | fn foo<T: ?Sized>() { bar::<T>() }
5   |        -                    ^ doesn't have a size known at compile-time
6   |        |
7   |        this type parameter needs to be `Sized`
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>() }
18   |
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0277`.