]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/recover-const-async-fn-ptr.stderr
Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27
[rust.git] / src / test / ui / parser / recover-const-async-fn-ptr.stderr
1 error: an `fn` pointer type cannot be `const`
2   --> $DIR/recover-const-async-fn-ptr.rs:3:11
3    |
4 LL | type T0 = const fn();
5    |           -----^^^^^
6    |           |
7    |           `const` because of this
8    |           help: remove the `const` qualifier
9
10 error: an `fn` pointer type cannot be `const`
11   --> $DIR/recover-const-async-fn-ptr.rs:4:11
12    |
13 LL | type T1 = const extern "C" fn();
14    |           -----^^^^^^^^^^^^^^^^
15    |           |
16    |           `const` because of this
17    |           help: remove the `const` qualifier
18
19 error: an `fn` pointer type cannot be `const`
20   --> $DIR/recover-const-async-fn-ptr.rs:5:11
21    |
22 LL | type T2 = const unsafe extern fn();
23    |           -----^^^^^^^^^^^^^^^^^^^
24    |           |
25    |           `const` because of this
26    |           help: remove the `const` qualifier
27
28 error: an `fn` pointer type cannot be `async`
29   --> $DIR/recover-const-async-fn-ptr.rs:6:11
30    |
31 LL | type T3 = async fn();
32    |           -----^^^^^
33    |           |
34    |           `async` because of this
35    |           help: remove the `async` qualifier
36
37 error: an `fn` pointer type cannot be `async`
38   --> $DIR/recover-const-async-fn-ptr.rs:7:11
39    |
40 LL | type T4 = async extern fn();
41    |           -----^^^^^^^^^^^^
42    |           |
43    |           `async` because of this
44    |           help: remove the `async` qualifier
45
46 error: an `fn` pointer type cannot be `async`
47   --> $DIR/recover-const-async-fn-ptr.rs:8:11
48    |
49 LL | type T5 = async unsafe extern "C" fn();
50    |           -----^^^^^^^^^^^^^^^^^^^^^^^
51    |           |
52    |           `async` because of this
53    |           help: remove the `async` qualifier
54
55 error: an `fn` pointer type cannot be `const`
56   --> $DIR/recover-const-async-fn-ptr.rs:9:11
57    |
58 LL | type T6 = const async unsafe extern "C" fn();
59    |           -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60    |           |
61    |           `const` because of this
62    |           help: remove the `const` qualifier
63
64 error: an `fn` pointer type cannot be `async`
65   --> $DIR/recover-const-async-fn-ptr.rs:9:11
66    |
67 LL | type T6 = const async unsafe extern "C" fn();
68    |           ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^
69    |                 |
70    |                 `async` because of this
71    |                 help: remove the `async` qualifier
72
73 error: an `fn` pointer type cannot be `const`
74   --> $DIR/recover-const-async-fn-ptr.rs:13:12
75    |
76 LL | type FT0 = for<'a> const fn();
77    |            ^^^^^^^^-----^^^^^
78    |                    |
79    |                    `const` because of this
80    |                    help: remove the `const` qualifier
81
82 error: an `fn` pointer type cannot be `const`
83   --> $DIR/recover-const-async-fn-ptr.rs:14:12
84    |
85 LL | type FT1 = for<'a> const extern "C" fn();
86    |            ^^^^^^^^-----^^^^^^^^^^^^^^^^
87    |                    |
88    |                    `const` because of this
89    |                    help: remove the `const` qualifier
90
91 error: an `fn` pointer type cannot be `const`
92   --> $DIR/recover-const-async-fn-ptr.rs:15:12
93    |
94 LL | type FT2 = for<'a> const unsafe extern fn();
95    |            ^^^^^^^^-----^^^^^^^^^^^^^^^^^^^
96    |                    |
97    |                    `const` because of this
98    |                    help: remove the `const` qualifier
99
100 error: an `fn` pointer type cannot be `async`
101   --> $DIR/recover-const-async-fn-ptr.rs:16:12
102    |
103 LL | type FT3 = for<'a> async fn();
104    |            ^^^^^^^^-----^^^^^
105    |                    |
106    |                    `async` because of this
107    |                    help: remove the `async` qualifier
108
109 error: an `fn` pointer type cannot be `async`
110   --> $DIR/recover-const-async-fn-ptr.rs:17:12
111    |
112 LL | type FT4 = for<'a> async extern fn();
113    |            ^^^^^^^^-----^^^^^^^^^^^^
114    |                    |
115    |                    `async` because of this
116    |                    help: remove the `async` qualifier
117
118 error: an `fn` pointer type cannot be `async`
119   --> $DIR/recover-const-async-fn-ptr.rs:18:12
120    |
121 LL | type FT5 = for<'a> async unsafe extern "C" fn();
122    |            ^^^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^
123    |                    |
124    |                    `async` because of this
125    |                    help: remove the `async` qualifier
126
127 error: an `fn` pointer type cannot be `const`
128   --> $DIR/recover-const-async-fn-ptr.rs:19:12
129    |
130 LL | type FT6 = for<'a> const async unsafe extern "C" fn();
131    |            ^^^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132    |                    |
133    |                    `const` because of this
134    |                    help: remove the `const` qualifier
135
136 error: an `fn` pointer type cannot be `async`
137   --> $DIR/recover-const-async-fn-ptr.rs:19:12
138    |
139 LL | type FT6 = for<'a> const async unsafe extern "C" fn();
140    |            ^^^^^^^^^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^
141    |                          |
142    |                          `async` because of this
143    |                          help: remove the `async` qualifier
144
145 error[E0308]: mismatched types
146   --> $DIR/recover-const-async-fn-ptr.rs:24:33
147    |
148 LL |     let _recovery_witness: () = 0;
149    |                            --   ^ expected `()`, found integer
150    |                            |
151    |                            expected due to this
152
153 error: aborting due to 17 previous errors
154
155 For more information about this error, try `rustc --explain E0308`.