@@ -200,7 +200,29 @@ LL | const fn union_access_can_be_const() {
200
200
| +++++
201
201
202
202
error: this could be a `const fn`
203
- --> tests/ui/missing_const_for_fn/could_be_const.rs:152:9
203
+ --> tests/ui/missing_const_for_fn/could_be_const.rs:146:9
204
+ |
205
+ LL | extern "C" fn c() {}
206
+ | ^^^^^^^^^^^^^^^^^^^^
207
+ |
208
+ help: make the function `const`
209
+ |
210
+ LL | const extern "C" fn c() {}
211
+ | +++++
212
+
213
+ error: this could be a `const fn`
214
+ --> tests/ui/missing_const_for_fn/could_be_const.rs:150:9
215
+ |
216
+ LL | extern fn implicit_c() {}
217
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
218
+ |
219
+ help: make the function `const`
220
+ |
221
+ LL | const extern fn implicit_c() {}
222
+ | +++++
223
+
224
+ error: this could be a `const fn`
225
+ --> tests/ui/missing_const_for_fn/could_be_const.rs:167:9
204
226
|
205
227
LL | / pub fn new(strings: Vec<String>) -> Self {
206
228
LL | | Self { strings }
@@ -213,7 +235,7 @@ LL | pub const fn new(strings: Vec<String>) -> Self {
213
235
| +++++
214
236
215
237
error: this could be a `const fn`
216
- --> tests/ui/missing_const_for_fn/could_be_const.rs:157 :9
238
+ --> tests/ui/missing_const_for_fn/could_be_const.rs:172 :9
217
239
|
218
240
LL | / pub fn empty() -> Self {
219
241
LL | | Self { strings: Vec::new() }
@@ -226,7 +248,7 @@ LL | pub const fn empty() -> Self {
226
248
| +++++
227
249
228
250
error: this could be a `const fn`
229
- --> tests/ui/missing_const_for_fn/could_be_const.rs:168 :9
251
+ --> tests/ui/missing_const_for_fn/could_be_const.rs:183 :9
230
252
|
231
253
LL | / pub fn new(text: String) -> Self {
232
254
LL | | let vec = Vec::new();
@@ -239,5 +261,5 @@ help: make the function `const`
239
261
LL | pub const fn new(text: String) -> Self {
240
262
| +++++
241
263
242
- error: aborting due to 17 previous errors
264
+ error: aborting due to 19 previous errors
243
265
0 commit comments