fork/rust

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

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

master
772 B23 linesraw
1error[E0792]: expected generic type parameter, found `&F`
2  --> $DIR/issue-99073.rs:6:11
3   |
4LL | fn fix<F: Fn(G), G: Fn()>(f: F) -> impl Fn() {
5   |        - this generic parameter must be used with a generic type parameter
6LL |   move || f(fix(&f))
7   |           ^^^^^^^^^^
8
9error: concrete type differs from previous defining opaque type use
10  --> $DIR/issue-99073.rs:6:13
11   |
12LL |   move || f(fix(&f))
13   |             ^^^^^^^ expected `{closure@$DIR/issue-99073.rs:6:3: 6:10}`, got `G`
14   |
15note: previous use here
16  --> $DIR/issue-99073.rs:5:36
17   |
18LL | fn fix<F: Fn(G), G: Fn()>(f: F) -> impl Fn() {
19   |                                    ^^^^^^^^^
20
21error: aborting due to 2 previous errors
22
23For more information about this error, try `rustc --explain E0792`.