summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/recover-fn-ptr-with-generics.stderr
blob: 1da9c18571b9ea712b6dfe840f35bca6837ad5f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
error: function pointer types may not have generic parameters
  --> $DIR/recover-fn-ptr-with-generics.rs:2:24
   |
LL |     type Predicate = fn<'a>(&'a str) -> bool;
   |                        ^^^^
   |
help: consider moving the lifetime parameter to a `for` parameter list
   |
LL -     type Predicate = fn<'a>(&'a str) -> bool;
LL +     type Predicate = for<'a> fn(&'a str) -> bool;
   |

error: function pointer types may not have generic parameters
  --> $DIR/recover-fn-ptr-with-generics.rs:5:23
   |
LL |     type Identity = fn<T>(T) -> T;
   |                       ^^^

error: function pointer types may not have generic parameters
  --> $DIR/recover-fn-ptr-with-generics.rs:10:14
   |
LL |     let _: fn<const N: usize, 'e, Q, 'f>();
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: consider moving the lifetime parameters to a `for` parameter list
   |
LL -     let _: fn<const N: usize, 'e, Q, 'f>();
LL +     let _: for<'e, 'f> fn();
   |

error: function pointer types may not have generic parameters
  --> $DIR/recover-fn-ptr-with-generics.rs:13:26
   |
LL |     let _: for<'outer> fn<'inner>();
   |                          ^^^^^^^^
   |
help: consider moving the lifetime parameter to the `for` parameter list
   |
LL -     let _: for<'outer> fn<'inner>();
LL +     let _: for<'outer, 'inner> fn();
   |

error: function pointer types may not have generic parameters
  --> $DIR/recover-fn-ptr-with-generics.rs:16:20
   |
LL |     let _: for<> fn<'r>();
   |                    ^^^^
   |
help: consider moving the lifetime parameter to the `for` parameter list
   |
LL -     let _: for<> fn<'r>();
LL +     let _: for<'r> fn();
   |

error: function pointer types may not have generic parameters
  --> $DIR/recover-fn-ptr-with-generics.rs:19:18
   |
LL |     type Hmm = fn<>();
   |                  ^^

error: function pointer types may not have generic parameters
  --> $DIR/recover-fn-ptr-with-generics.rs:22:21
   |
LL |     let _: extern fn<'a: 'static>();
   |                     ^^^^^^^^^^^^^
   |
help: consider moving the lifetime parameter to a `for` parameter list
   |
LL -     let _: extern fn<'a: 'static>();
LL +     let _: for<'a> extern fn();
   |

error: function pointer types may not have generic parameters
  --> $DIR/recover-fn-ptr-with-generics.rs:26:35
   |
LL |     let _: for<'any> extern "C" fn<'u>();
   |                                   ^^^^
   |
help: consider moving the lifetime parameter to the `for` parameter list
   |
LL -     let _: for<'any> extern "C" fn<'u>();
LL +     let _: for<'any, 'u> extern "C" fn();
   |

error: expected identifier, found `>`
  --> $DIR/recover-fn-ptr-with-generics.rs:29:32
   |
LL |     type QuiteBroken = fn<const>();
   |                                ^ expected identifier

error: lifetime bounds cannot be used in this context
  --> $DIR/recover-fn-ptr-with-generics.rs:22:26
   |
LL |     let _: extern fn<'a: 'static>();
   |                          ^^^^^^^

error[E0412]: cannot find type `T` in this scope
  --> $DIR/recover-fn-ptr-with-generics.rs:5:27
   |
LL |     type Identity = fn<T>(T) -> T;
   |                           ^ not found in this scope

error[E0412]: cannot find type `T` in this scope
  --> $DIR/recover-fn-ptr-with-generics.rs:5:33
   |
LL |     type Identity = fn<T>(T) -> T;
   |                                 ^ not found in this scope

error: aborting due to 12 previous errors

For more information about this error, try `rustc --explain E0412`.