From ca92c516820e760173c40a9cbb42daef8111c93e Mon Sep 17 00:00:00 2001 From: whataloadofwhat Date: Fri, 10 Feb 2017 17:55:00 +0000 Subject: Change std::panicking::try::Data into a union No longer potentially call `mem::uninitialized::()` Fixes #39432 --- src/test/run-pass/catch-unwind-bang.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/run-pass/catch-unwind-bang.rs (limited to 'src/test') diff --git a/src/test/run-pass/catch-unwind-bang.rs b/src/test/run-pass/catch-unwind-bang.rs new file mode 100644 index 00000000000..df54ec90022 --- /dev/null +++ b/src/test/run-pass/catch-unwind-bang.rs @@ -0,0 +1,17 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn worker() -> ! { + panic!() +} + +fn main() { + std::panic::catch_unwind(worker).unwrap_err(); +} -- cgit 1.4.1-3-g733a5