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