-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #2903 - saethlin:rustup, r=RalfJung
rustup
- Loading branch information
Showing
7 changed files
with
54 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
be72f2587c91579406117f99fa332383d66b7dcd | ||
089677eb32af83318467325edbef9b64053df532 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//@normalize-stderr-test: "\| +\^+" -> "| ^" | ||
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "$1" | ||
//@normalize-stderr-test: "\n at [^\n]+" -> "$1" | ||
|
||
// Checks that nested panics work correctly. | ||
|
||
use std::panic::catch_unwind; | ||
|
||
fn double() { | ||
struct Double; | ||
|
||
impl Drop for Double { | ||
fn drop(&mut self) { | ||
let _ = catch_unwind(|| panic!("twice")); | ||
} | ||
} | ||
|
||
let _d = Double; | ||
|
||
panic!("once"); | ||
} | ||
|
||
fn main() { | ||
assert!(catch_unwind(|| double()).is_err()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
thread 'main' panicked at 'once', $DIR/nested_panic_caught.rs:LL:CC | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace | ||
thread 'main' panicked at 'twice', $DIR/nested_panic_caught.rs:LL:CC | ||
stack backtrace: |