diff options
| author | bors <bors@rust-lang.org> | 2020-04-30 07:04:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-04-30 07:04:43 +0000 |
| commit | bf459752d41a93eb6df0e9513de4ef807883a80c (patch) | |
| tree | 6a6e05a05077a1f72fcf055196b69be3eb341b6a /src/test/run-fail | |
| parent | 7c8dbd969dd0ef2af6d8bab9e03ba7ce6cac41a2 (diff) | |
| parent | c6817ffb2cadae7f80414e13d99e89ec83db9a77 (diff) | |
Auto merge of #70175 - Amanieu:remove_nlp, r=pnkfelix
Remove -Z no-landing-pads flag Since #67502, `-Z no-landing-pads` will cause all attempted unwinds to abort since we don't generate a `try` / `catch`. This previously worked because `__rust_try` was located in libpanic_unwind which is always compiled with `-C panic=unwind`, but `__rust_try` is now directly inline into the crate that uses `catch_unwind`. As such, `-Z no-landing-pads` is now mostly useless and people should use `-C panic=abort` instead.
Diffstat (limited to 'src/test/run-fail')
| -rw-r--r-- | src/test/run-fail/mir_codegen_no_landing_pads.rs | 27 | ||||
| -rw-r--r-- | src/test/run-fail/mir_codegen_no_landing_pads_diverging.rs | 27 |
2 files changed, 0 insertions, 54 deletions
diff --git a/src/test/run-fail/mir_codegen_no_landing_pads.rs b/src/test/run-fail/mir_codegen_no_landing_pads.rs deleted file mode 100644 index f3384dc45f3..00000000000 --- a/src/test/run-fail/mir_codegen_no_landing_pads.rs +++ /dev/null @@ -1,27 +0,0 @@ -// compile-flags: -Z no-landing-pads -C codegen-units=1 -// error-pattern:converging_fn called -// ignore-cloudabi no std::process - -use std::io::{self, Write}; - -struct Droppable; -impl Drop for Droppable { - fn drop(&mut self) { - ::std::process::exit(1) - } -} - -fn converging_fn() { - panic!("converging_fn called") -} - -fn mir(d: Droppable) { - let x = Droppable; - converging_fn(); - drop(x); - drop(d); -} - -fn main() { - mir(Droppable); -} diff --git a/src/test/run-fail/mir_codegen_no_landing_pads_diverging.rs b/src/test/run-fail/mir_codegen_no_landing_pads_diverging.rs deleted file mode 100644 index 08f6d578bb2..00000000000 --- a/src/test/run-fail/mir_codegen_no_landing_pads_diverging.rs +++ /dev/null @@ -1,27 +0,0 @@ -// compile-flags: -Z no-landing-pads -C codegen-units=1 -// error-pattern:diverging_fn called -// ignore-cloudabi no std::process - -use std::io::{self, Write}; - -struct Droppable; -impl Drop for Droppable { - fn drop(&mut self) { - ::std::process::exit(1) - } -} - -fn diverging_fn() -> ! { - panic!("diverging_fn called") -} - -fn mir(d: Droppable) { - let x = Droppable; - diverging_fn(); - drop(x); - drop(d); -} - -fn main() { - mir(Droppable); -} |
