Skip to content

Commit 15951c5

Browse files
Fix warnings from abi_efiapi stabilization
The `abi_efiapi` feature has been stabilized, so in the very latest nightlies we get this warning from enabling it: the feature `abi_efiapi` has been stable since 1.68.0-nightly and no longer requires an attribute to enable We don't want to stop using `#![feature(abi_efiapi)]` just yet though, because that would require raising our nightly MSRV to 2023-01-13. So for now, to get the CI passing again, turn off the `stable_features` warning. In the `uefi-macros` tests, just remove `#![feature(abi_efiapi)]` since that code is only run when developing uefi-rs, not when using it.
1 parent e8e0429 commit 15951c5

25 files changed

+25
-27
lines changed

template/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![no_main]
22
#![no_std]
33
#![feature(abi_efiapi)]
4+
#![allow(stable_features)]
45

56
use uefi::prelude::*;
67

uefi-macros/tests/ui/entry_bad_abi.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(unused_imports)]
22
#![no_main]
3-
#![feature(abi_efiapi)]
43

54
use uefi::prelude::*;
65
use uefi_macros::entry;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method must have no ABI modifier
2-
--> tests/ui/entry_bad_abi.rs:9:1
2+
--> tests/ui/entry_bad_abi.rs:8:1
33
|
4-
9 | extern "C" fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
4+
8 | extern "C" fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
55
| ^^^^^^^^^^

uefi-macros/tests/ui/entry_bad_arg.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(unused_imports)]
22
#![no_main]
3-
#![feature(abi_efiapi)]
43

54
use uefi::prelude::*;
65
use uefi_macros::entry;

uefi-macros/tests/ui/entry_bad_arg.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0308]: mismatched types
2-
--> tests/ui/entry_bad_arg.rs:9:4
2+
--> tests/ui/entry_bad_arg.rs:8:4
33
|
4-
9 | fn main(_handle: Handle, _st: SystemTable<Boot>, _x: usize) -> Status {
4+
8 | fn main(_handle: Handle, _st: SystemTable<Boot>, _x: usize) -> Status {
55
| ^^^^ incorrect number of function parameters
66
|
77
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>) -> uefi::Status`

uefi-macros/tests/ui/entry_bad_async.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(unused_imports)]
22
#![no_main]
3-
#![feature(abi_efiapi)]
43

54
use uefi::prelude::*;
65
use uefi_macros::entry;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method should not be async
2-
--> tests/ui/entry_bad_async.rs:9:1
2+
--> tests/ui/entry_bad_async.rs:8:1
33
|
4-
9 | async fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
4+
8 | async fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
55
| ^^^^^

uefi-macros/tests/ui/entry_bad_attr_arg.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(unused_imports)]
22
#![no_main]
3-
#![feature(abi_efiapi)]
43

54
use uefi::prelude::*;
65
use uefi_macros::entry;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry attribute accepts no arguments
2-
--> tests/ui/entry_bad_attr_arg.rs:8:9
2+
--> tests/ui/entry_bad_attr_arg.rs:7:9
33
|
4-
8 | #[entry(some_arg)]
4+
7 | #[entry(some_arg)]
55
| ^^^^^^^^

uefi-macros/tests/ui/entry_bad_const.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(unused_imports)]
22
#![no_main]
3-
#![feature(abi_efiapi)]
43

54
use uefi::prelude::*;
65
use uefi_macros::entry;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method should not be const
2-
--> tests/ui/entry_bad_const.rs:9:1
2+
--> tests/ui/entry_bad_const.rs:8:1
33
|
4-
9 | const fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
4+
8 | const fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
55
| ^^^^^

uefi-macros/tests/ui/entry_bad_generic.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(unused_imports)]
22
#![no_main]
3-
#![feature(abi_efiapi)]
43

54
use uefi::prelude::*;
65
use uefi_macros::entry;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method should not be generic
2-
--> tests/ui/entry_bad_generic.rs:9:9
2+
--> tests/ui/entry_bad_generic.rs:8:9
33
|
4-
9 | fn main<T>(_handle: Handle, _st: SystemTable<Boot>) -> Status {
4+
8 | fn main<T>(_handle: Handle, _st: SystemTable<Boot>) -> Status {
55
| ^

uefi-macros/tests/ui/entry_bad_return_type.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(unused_imports)]
22
#![no_main]
3-
#![feature(abi_efiapi)]
43

54
use uefi::prelude::*;
65
use uefi_macros::entry;

uefi-macros/tests/ui/entry_bad_return_type.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0308]: mismatched types
2-
--> tests/ui/entry_bad_return_type.rs:9:4
2+
--> tests/ui/entry_bad_return_type.rs:8:4
33
|
4-
9 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
4+
8 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
55
| ^^^^ expected struct `Status`, found `bool`
66
|
77
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<_>) -> Status`

uefi-macros/tests/ui/entry_unnamed_image_arg.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(unused_imports)]
22
#![no_main]
3-
#![feature(abi_efiapi)]
43

54
use uefi::prelude::*;
65
use uefi_macros::entry;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method's arguments must be named
2-
--> tests/ui/entry_unnamed_image_arg.rs:9:22
2+
--> tests/ui/entry_unnamed_image_arg.rs:8:22
33
|
4-
9 | fn unnamed_image_arg(_: Handle, _st: SystemTable<Boot>) -> Status {
4+
8 | fn unnamed_image_arg(_: Handle, _st: SystemTable<Boot>) -> Status {
55
| ^^^^^^^^^

uefi-macros/tests/ui/entry_unnamed_table_arg.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(unused_imports)]
22
#![no_main]
3-
#![feature(abi_efiapi)]
43

54
use uefi::prelude::*;
65
use uefi_macros::entry;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method's arguments must be named
2-
--> tests/ui/entry_unnamed_table_arg.rs:9:38
2+
--> tests/ui/entry_unnamed_table_arg.rs:8:38
33
|
4-
9 | fn unnamed_table_arg(_image: Handle, _: SystemTable<Boot>) -> Status {
4+
8 | fn unnamed_table_arg(_image: Handle, _: SystemTable<Boot>) -> Status {
55
| ^^^^^^^^^^^^^^^^^^^^

uefi-services/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#![feature(alloc_error_handler)]
3131
#![feature(abi_efiapi)]
3232
#![deny(clippy::must_use_candidate)]
33+
#![allow(stable_features)]
3334

3435
extern crate log;
3536
// Core types.

uefi-test-runner/examples/hello_world.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#![no_main]
44
#![no_std]
55
#![feature(abi_efiapi)]
6+
#![allow(stable_features)]
67
// ANCHOR_END: features
78

89
// ANCHOR: use

uefi-test-runner/examples/loaded_image.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![no_main]
33
#![no_std]
44
#![feature(abi_efiapi)]
5+
#![allow(stable_features)]
56

67
use log::info;
78
use uefi::prelude::*;

uefi-test-runner/examples/sierpinski.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![no_main]
33
#![no_std]
44
#![feature(abi_efiapi)]
5+
#![allow(stable_features)]
56

67
extern crate alloc;
78

uefi-test-runner/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![no_std]
22
#![no_main]
33
#![feature(abi_efiapi)]
4+
#![allow(stable_features)]
45

56
#[macro_use]
67
extern crate log;

uefi/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#![warn(clippy::ptr_as_ptr, missing_docs, unused)]
6868
#![deny(clippy::all)]
6969
#![deny(clippy::must_use_candidate)]
70+
#![allow(stable_features)]
7071

7172
#[cfg(feature = "alloc")]
7273
extern crate alloc;

0 commit comments

Comments
 (0)