Skip to content

Commit 4655b72

Browse files
committed
Auto merge of #59640 - cuviper:beta-no-unwind-abort, r=Mark-Simulacrum
[beta] Permit unwinding through FFI by default Let's kick the can down the road, keeping FFI-unwind-abort out of stable until #58794 is resolved. cc @rust-lang/release
2 parents 59400ff + dc68548 commit 4655b72

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/librustc_mir/build/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ fn should_abort_on_panic<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
591591
// unwind anyway. Don't stop them.
592592
let attrs = &tcx.get_attrs(fn_def_id);
593593
match attr::find_unwind_attr(Some(tcx.sess.diagnostic()), attrs) {
594-
None => true,
594+
None => false, // FIXME(#58794)
595595
Some(UnwindAttr::Allowed) => false,
596596
Some(UnwindAttr::Aborts) => true,
597597
}

src/test/incremental/hashes/function_interfaces.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub unsafe fn make_unsafe() {}
9494
pub fn make_extern() {}
9595

9696
#[cfg(not(cfail1))]
97-
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, MirBuilt, TypeckTables, FnSignature")]
97+
#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, TypeckTables, FnSignature")]
9898
#[rustc_clean(cfg = "cfail3")]
9999
pub extern "C" fn make_extern() {}
100100

src/test/incremental/hashes/inherent_impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ impl Foo {
263263
#[rustc_clean(cfg="cfail2")]
264264
#[rustc_clean(cfg="cfail3")]
265265
impl Foo {
266-
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,MirBuilt,FnSignature,TypeckTables")]
266+
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,FnSignature,TypeckTables")]
267267
#[rustc_clean(cfg="cfail3")]
268268
pub extern fn make_method_extern(&self) { }
269269
}

src/test/run-pass/abort-on-c-abi.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![allow(unused_must_use)]
2+
#![feature(unwind_attributes)]
23
// Since we mark some ABIs as "nounwind" to LLVM, we must make sure that
34
// we never unwind through them.
45

@@ -10,6 +11,7 @@ use std::io::prelude::*;
1011
use std::io;
1112
use std::process::{Command, Stdio};
1213

14+
#[unwind(aborts)] // FIXME(#58794)
1315
extern "C" fn panic_in_ffi() {
1416
panic!("Test");
1517
}

0 commit comments

Comments
 (0)