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