fork/rust

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

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

master
985 B31 linesraw
1error[E0792]: expected generic type parameter, found `u8`
2  --> $DIR/non-defining-use.rs:4:12
3   |
4LL | fn foo<T>() -> impl Sized {
5   |        - this generic parameter must be used with a generic type parameter
6LL |     let _: () = foo::<u8>();
7   |            ^^
8
9error[E0792]: expected generic type parameter, found `u8`
10  --> $DIR/non-defining-use.rs:8:12
11   |
12LL | fn bar<T>(val: T) -> impl Sized {
13   |        - this generic parameter must be used with a generic type parameter
14LL |     let _: u8 = bar(0u8);
15   |            ^^
16
17error: concrete type differs from previous defining opaque type use
18  --> $DIR/non-defining-use.rs:8:17
19   |
20LL |     let _: u8 = bar(0u8);
21   |                 ^^^^^^^^ expected `T`, got `u8`
22   |
23note: previous use here
24  --> $DIR/non-defining-use.rs:7:22
25   |
26LL | fn bar<T>(val: T) -> impl Sized {
27   |                      ^^^^^^^^^^
28
29error: aborting due to 3 previous errors
30
31For more information about this error, try `rustc --explain E0792`.