-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #104020 - nicholasbishop:bishop-limit-efiapi, r=nagisa
Limit efiapi calling convention to supported arches Supported architectures in UEFI are described here: https://uefi.org/specs/UEFI/2.10/02_Overview.html#calling-conventions #65815
- Loading branch information
Showing
5 changed files
with
130 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// needs-llvm-components: x86 | ||
// compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib | ||
#![no_core] | ||
#![feature(no_core, lang_items)] | ||
#[lang="sized"] | ||
trait Sized { } | ||
|
||
// Functions | ||
extern "efiapi" fn f1() {} //~ ERROR efiapi ABI is experimental | ||
|
||
// Methods in trait defintion | ||
trait Tr { | ||
extern "efiapi" fn f2(); //~ ERROR efiapi ABI is experimental | ||
extern "efiapi" fn f3() {} //~ ERROR efiapi ABI is experimental | ||
} | ||
|
||
struct S; | ||
|
||
// Methods in trait impl | ||
impl Tr for S { | ||
extern "efiapi" fn f2() {} //~ ERROR efiapi ABI is experimental | ||
} | ||
|
||
// Methods in inherent impl | ||
impl S { | ||
extern "efiapi" fn f4() {} //~ ERROR efiapi ABI is experimental | ||
} | ||
|
||
// Function pointer types | ||
type A = extern "efiapi" fn(); //~ ERROR efiapi ABI is experimental | ||
|
||
// Foreign modules | ||
extern "efiapi" {} //~ ERROR efiapi ABI is experimental |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
error[E0658]: efiapi ABI is experimental and subject to change | ||
--> $DIR/feature-gate-abi-efiapi.rs:9:8 | ||
| | ||
LL | extern "efiapi" fn f1() {} | ||
| ^^^^^^^^ | ||
| | ||
= note: see issue #65815 <https://github.com/rust-lang/rust/issues/65815> for more information | ||
= help: add `#![feature(abi_efiapi)]` to the crate attributes to enable | ||
|
||
error[E0658]: efiapi ABI is experimental and subject to change | ||
--> $DIR/feature-gate-abi-efiapi.rs:13:12 | ||
| | ||
LL | extern "efiapi" fn f2(); | ||
| ^^^^^^^^ | ||
| | ||
= note: see issue #65815 <https://github.com/rust-lang/rust/issues/65815> for more information | ||
= help: add `#![feature(abi_efiapi)]` to the crate attributes to enable | ||
|
||
error[E0658]: efiapi ABI is experimental and subject to change | ||
--> $DIR/feature-gate-abi-efiapi.rs:14:12 | ||
| | ||
LL | extern "efiapi" fn f3() {} | ||
| ^^^^^^^^ | ||
| | ||
= note: see issue #65815 <https://github.com/rust-lang/rust/issues/65815> for more information | ||
= help: add `#![feature(abi_efiapi)]` to the crate attributes to enable | ||
|
||
error[E0658]: efiapi ABI is experimental and subject to change | ||
--> $DIR/feature-gate-abi-efiapi.rs:21:12 | ||
| | ||
LL | extern "efiapi" fn f2() {} | ||
| ^^^^^^^^ | ||
| | ||
= note: see issue #65815 <https://github.com/rust-lang/rust/issues/65815> for more information | ||
= help: add `#![feature(abi_efiapi)]` to the crate attributes to enable | ||
|
||
error[E0658]: efiapi ABI is experimental and subject to change | ||
--> $DIR/feature-gate-abi-efiapi.rs:26:12 | ||
| | ||
LL | extern "efiapi" fn f4() {} | ||
| ^^^^^^^^ | ||
| | ||
= note: see issue #65815 <https://github.com/rust-lang/rust/issues/65815> for more information | ||
= help: add `#![feature(abi_efiapi)]` to the crate attributes to enable | ||
|
||
error[E0658]: efiapi ABI is experimental and subject to change | ||
--> $DIR/feature-gate-abi-efiapi.rs:30:17 | ||
| | ||
LL | type A = extern "efiapi" fn(); | ||
| ^^^^^^^^ | ||
| | ||
= note: see issue #65815 <https://github.com/rust-lang/rust/issues/65815> for more information | ||
= help: add `#![feature(abi_efiapi)]` to the crate attributes to enable | ||
|
||
error[E0658]: efiapi ABI is experimental and subject to change | ||
--> $DIR/feature-gate-abi-efiapi.rs:33:8 | ||
| | ||
LL | extern "efiapi" {} | ||
| ^^^^^^^^ | ||
| | ||
= note: see issue #65815 <https://github.com/rust-lang/rust/issues/65815> for more information | ||
= help: add `#![feature(abi_efiapi)]` to the crate attributes to enable | ||
|
||
error: aborting due to 7 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.