File tree 3 files changed +14
-14
lines changed
tests/ui/missing_const_for_fn
3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 1
1
#![warn(clippy::missing_const_for_fn)]
2
2
#![allow(incomplete_features, clippy::let_and_return, clippy::missing_transmute_annotations)]
3
- #![allow(unsupported_calling_conventions )]
4
- #![feature(const_trait_impl)]
3
+ #![feature(const_trait_impl, abi_vectorcall )]
4
+
5
5
6
6
use std::mem::transmute;
7
7
@@ -212,8 +212,8 @@ mod extern_fn {
212
212
//~^ ERROR: this could be a `const fn`
213
213
const extern "system-unwind" fn system_unwind() {}
214
214
//~^ ERROR: this could be a `const fn`
215
- pub const extern "stdcall " fn std_call() {}
215
+ pub const extern "vectorcall " fn std_call() {}
216
216
//~^ ERROR: this could be a `const fn`
217
- pub const extern "stdcall -unwind" fn std_call_unwind() {}
217
+ pub const extern "vectorcall -unwind" fn std_call_unwind() {}
218
218
//~^ ERROR: this could be a `const fn`
219
219
}
Original file line number Diff line number Diff line change 1
1
#![ warn( clippy:: missing_const_for_fn) ]
2
2
#![ allow( incomplete_features, clippy:: let_and_return, clippy:: missing_transmute_annotations) ]
3
- #![ allow ( unsupported_calling_conventions ) ]
4
- #! [ feature ( const_trait_impl ) ]
3
+ #![ feature ( const_trait_impl , abi_vectorcall ) ]
4
+
5
5
6
6
use std:: mem:: transmute;
7
7
@@ -212,8 +212,8 @@ mod extern_fn {
212
212
//~^ ERROR: this could be a `const fn`
213
213
extern "system-unwind" fn system_unwind ( ) { }
214
214
//~^ ERROR: this could be a `const fn`
215
- pub extern "stdcall " fn std_call ( ) { }
215
+ pub extern "vectorcall " fn std_call ( ) { }
216
216
//~^ ERROR: this could be a `const fn`
217
- pub extern "stdcall -unwind" fn std_call_unwind ( ) { }
217
+ pub extern "vectorcall -unwind" fn std_call_unwind ( ) { }
218
218
//~^ ERROR: this could be a `const fn`
219
219
}
Original file line number Diff line number Diff line change @@ -319,23 +319,23 @@ LL | const extern "system-unwind" fn system_unwind() {}
319
319
error: this could be a `const fn`
320
320
--> tests/ui/missing_const_for_fn/could_be_const.rs:215:5
321
321
|
322
- LL | pub extern "stdcall " fn std_call() {}
323
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
322
+ LL | pub extern "vectorcall " fn std_call() {}
323
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
324
324
|
325
325
help: make the function `const`
326
326
|
327
- LL | pub const extern "stdcall " fn std_call() {}
327
+ LL | pub const extern "vectorcall " fn std_call() {}
328
328
| +++++
329
329
330
330
error: this could be a `const fn`
331
331
--> tests/ui/missing_const_for_fn/could_be_const.rs:217:5
332
332
|
333
- LL | pub extern "stdcall -unwind" fn std_call_unwind() {}
334
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
333
+ LL | pub extern "vectorcall -unwind" fn std_call_unwind() {}
334
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
335
335
|
336
336
help: make the function `const`
337
337
|
338
- LL | pub const extern "stdcall -unwind" fn std_call_unwind() {}
338
+ LL | pub const extern "vectorcall -unwind" fn std_call_unwind() {}
339
339
| +++++
340
340
341
341
error: aborting due to 26 previous errors
You can’t perform that action at this time.
0 commit comments