File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed
tests/ui/missing_const_for_fn Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 11#![warn(clippy::missing_const_for_fn)]
22#![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+
55
66use std::mem::transmute;
77
@@ -212,8 +212,8 @@ mod extern_fn {
212212 //~^ ERROR: this could be a `const fn`
213213 const extern "system-unwind" fn system_unwind() {}
214214 //~^ ERROR: this could be a `const fn`
215- pub const extern "stdcall " fn std_call() {}
215+ pub const extern "vectorcall " fn std_call() {}
216216 //~^ 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() {}
218218 //~^ ERROR: this could be a `const fn`
219219}
Original file line number Diff line number Diff line change 11#![ warn( clippy:: missing_const_for_fn) ]
22#![ 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+
55
66use std:: mem:: transmute;
77
@@ -212,8 +212,8 @@ mod extern_fn {
212212 //~^ ERROR: this could be a `const fn`
213213 extern "system-unwind" fn system_unwind ( ) { }
214214 //~^ ERROR: this could be a `const fn`
215- pub extern "stdcall " fn std_call ( ) { }
215+ pub extern "vectorcall " fn std_call ( ) { }
216216 //~^ 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 ( ) { }
218218 //~^ ERROR: this could be a `const fn`
219219}
Original file line number Diff line number Diff line change @@ -319,23 +319,23 @@ LL | const extern "system-unwind" fn system_unwind() {}
319319error: this could be a `const fn`
320320 --> tests/ui/missing_const_for_fn/could_be_const.rs:215:5
321321 |
322- LL | pub extern "stdcall " fn std_call() {}
323- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
322+ LL | pub extern "vectorcall " fn std_call() {}
323+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
324324 |
325325help: make the function `const`
326326 |
327- LL | pub const extern "stdcall " fn std_call() {}
327+ LL | pub const extern "vectorcall " fn std_call() {}
328328 | +++++
329329
330330error: this could be a `const fn`
331331 --> tests/ui/missing_const_for_fn/could_be_const.rs:217:5
332332 |
333- LL | pub extern "stdcall -unwind" fn std_call_unwind() {}
334- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
333+ LL | pub extern "vectorcall -unwind" fn std_call_unwind() {}
334+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
335335 |
336336help: make the function `const`
337337 |
338- LL | pub const extern "stdcall -unwind" fn std_call_unwind() {}
338+ LL | pub const extern "vectorcall -unwind" fn std_call_unwind() {}
339339 | +++++
340340
341341error: aborting due to 26 previous errors
You can’t perform that action at this time.
0 commit comments