Skip to content

Commit 10d9198

Browse files
committed
Add explicit_extern_abis unstable feature
1 parent 9749362 commit 10d9198

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

compiler/rustc_feature/src/unstable.rs

+2
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ declare_features! (
479479
(incomplete, dyn_star, "1.65.0", Some(102425)),
480480
/// Allows exhaustive pattern matching on types that contain uninhabited types.
481481
(unstable, exhaustive_patterns, "1.13.0", Some(51085)),
482+
/// Allows explicit extern ABIs.
483+
(unstable, explicit_extern_abis, "1.84.2", Some(134986)),
482484
/// Allows explicit tail calls via `become` expression.
483485
(incomplete, explicit_tail_calls, "1.72.0", Some(112788)),
484486
/// Allows defining `extern type`s.

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ symbols! {
853853
expf16,
854854
expf32,
855855
expf64,
856+
explicit_extern_abis,
856857
explicit_generic_args_with_impl_trait,
857858
explicit_tail_calls,
858859
export_name,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#![feature(explicit_extern_abis)]
2+
3+
extern fn foo() {}
4+
//~^ ERROR extern declarations without an explicit ABI are disallowed
5+
6+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: extern declarations without an explicit ABI are disallowed
2+
--> $DIR/feature-gate-explicit-extern-abis.rs:3:1
3+
|
4+
LL | extern fn foo() {}
5+
| ^^^^^^
6+
7+
error: aborting due to 1 previous error
8+

0 commit comments

Comments
 (0)