Ensure ffi_unwind_calls lint is gated behind c_unwind
This commit is contained in:
parent
77fd0cc566
commit
bc5afd9e34
2 changed files with 27 additions and 2 deletions
|
|
@ -1,6 +1,10 @@
|
|||
// Test that the "C-unwind" ABI is feature-gated, and cannot be used when the
|
||||
// `c_unwind` feature gate is not used.
|
||||
|
||||
#![allow(ffi_unwind_calls)]
|
||||
//~^ WARNING unknown lint: `ffi_unwind_calls`
|
||||
//~| WARNING unknown lint: `ffi_unwind_calls`
|
||||
|
||||
extern "C-unwind" fn f() {}
|
||||
//~^ ERROR C-unwind ABI is experimental and subject to change [E0658]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
warning: unknown lint: `ffi_unwind_calls`
|
||||
--> $DIR/feature-gate-c-unwind.rs:4:1
|
||||
|
|
||||
LL | #![allow(ffi_unwind_calls)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(unknown_lints)]` on by default
|
||||
= note: the `ffi_unwind_calls` lint is unstable
|
||||
= note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
|
||||
= help: add `#![feature(c_unwind)]` to the crate attributes to enable
|
||||
|
||||
error[E0658]: C-unwind ABI is experimental and subject to change
|
||||
--> $DIR/feature-gate-c-unwind.rs:4:8
|
||||
--> $DIR/feature-gate-c-unwind.rs:8:8
|
||||
|
|
||||
LL | extern "C-unwind" fn f() {}
|
||||
| ^^^^^^^^^^
|
||||
|
|
@ -7,6 +18,16 @@ LL | extern "C-unwind" fn f() {}
|
|||
= note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
|
||||
= help: add `#![feature(c_unwind)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
warning: unknown lint: `ffi_unwind_calls`
|
||||
--> $DIR/feature-gate-c-unwind.rs:4:1
|
||||
|
|
||||
LL | #![allow(ffi_unwind_calls)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: the `ffi_unwind_calls` lint is unstable
|
||||
= note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
|
||||
= help: add `#![feature(c_unwind)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error; 2 warnings emitted
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue