fork/rust

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

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

master
3.4 KiB111 linesraw
1error: function pointer types may not have generic parameters
2  --> $DIR/recover-fn-ptr-with-generics.rs:2:24
3   |
4LL |     type Predicate = fn<'a>(&'a str) -> bool;
5   |                        ^^^^
6   |
7help: consider moving the lifetime parameter to a `for` parameter list
8   |
9LL -     type Predicate = fn<'a>(&'a str) -> bool;
10LL +     type Predicate = for<'a> fn(&'a str) -> bool;
11   |
12
13error: function pointer types may not have generic parameters
14  --> $DIR/recover-fn-ptr-with-generics.rs:5:23
15   |
16LL |     type Identity = fn<T>(T) -> T;
17   |                       ^^^
18
19error: function pointer types may not have generic parameters
20  --> $DIR/recover-fn-ptr-with-generics.rs:10:14
21   |
22LL |     let _: fn<const N: usize, 'e, Q, 'f>();
23   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
24   |
25help: consider moving the lifetime parameters to a `for` parameter list
26   |
27LL -     let _: fn<const N: usize, 'e, Q, 'f>();
28LL +     let _: for<'e, 'f> fn();
29   |
30
31error: function pointer types may not have generic parameters
32  --> $DIR/recover-fn-ptr-with-generics.rs:13:26
33   |
34LL |     let _: for<'outer> fn<'inner>();
35   |                          ^^^^^^^^
36   |
37help: consider moving the lifetime parameter to the `for` parameter list
38   |
39LL -     let _: for<'outer> fn<'inner>();
40LL +     let _: for<'outer, 'inner> fn();
41   |
42
43error: function pointer types may not have generic parameters
44  --> $DIR/recover-fn-ptr-with-generics.rs:16:20
45   |
46LL |     let _: for<> fn<'r>();
47   |                    ^^^^
48   |
49help: consider moving the lifetime parameter to the `for` parameter list
50   |
51LL -     let _: for<> fn<'r>();
52LL +     let _: for<'r> fn();
53   |
54
55error: function pointer types may not have generic parameters
56  --> $DIR/recover-fn-ptr-with-generics.rs:19:18
57   |
58LL |     type Hmm = fn<>();
59   |                  ^^
60
61error: function pointer types may not have generic parameters
62  --> $DIR/recover-fn-ptr-with-generics.rs:22:21
63   |
64LL |     let _: extern fn<'a: 'static>();
65   |                     ^^^^^^^^^^^^^
66   |
67help: consider moving the lifetime parameter to a `for` parameter list
68   |
69LL -     let _: extern fn<'a: 'static>();
70LL +     let _: for<'a> extern fn();
71   |
72
73error: function pointer types may not have generic parameters
74  --> $DIR/recover-fn-ptr-with-generics.rs:26:35
75   |
76LL |     let _: for<'any> extern "C" fn<'u>();
77   |                                   ^^^^
78   |
79help: consider moving the lifetime parameter to the `for` parameter list
80   |
81LL -     let _: for<'any> extern "C" fn<'u>();
82LL +     let _: for<'any, 'u> extern "C" fn();
83   |
84
85error: expected identifier, found `>`
86  --> $DIR/recover-fn-ptr-with-generics.rs:29:32
87   |
88LL |     type QuiteBroken = fn<const>();
89   |                                ^ expected identifier
90
91error[E0412]: cannot find type `T` in this scope
92  --> $DIR/recover-fn-ptr-with-generics.rs:5:27
93   |
94LL |     type Identity = fn<T>(T) -> T;
95   |                           ^ not found in this scope
96
97error[E0412]: cannot find type `T` in this scope
98  --> $DIR/recover-fn-ptr-with-generics.rs:5:33
99   |
100LL |     type Identity = fn<T>(T) -> T;
101   |                                 ^ not found in this scope
102
103error: lifetime bounds cannot be used in this context
104  --> $DIR/recover-fn-ptr-with-generics.rs:22:26
105   |
106LL |     let _: extern fn<'a: 'static>();
107   |                          ^^^^^^^
108
109error: aborting due to 12 previous errors
110
111For more information about this error, try `rustc --explain E0412`.