fork/rust

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

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

master
897 B24 linesraw
1error[E0792]: expected generic type parameter, found `i32`
2  --> $DIR/issue-99073-2.rs:9:22
3   |
4LL | fn test<T: Display>(t: T, recurse: bool) -> impl Display {
5   |         - this generic parameter must be used with a generic type parameter
6LL |     let f = || {
7LL |         let i: u32 = test::<i32>(-1, false);
8   |                      ^^^^^^^^^^^^^^^^^^^^^^
9
10error: concrete type differs from previous defining opaque type use
11  --> $DIR/issue-99073-2.rs:9:22
12   |
13LL |         let i: u32 = test::<i32>(-1, false);
14   |                      ^^^^^^^^^^^^^^^^^^^^^^ expected `T`, got `u32`
15   |
16note: previous use here
17  --> $DIR/issue-99073-2.rs:7:45
18   |
19LL | fn test<T: Display>(t: T, recurse: bool) -> impl Display {
20   |                                             ^^^^^^^^^^^^
21
22error: aborting due to 2 previous errors
23
24For more information about this error, try `rustc --explain E0792`.