-
Notifications
You must be signed in to change notification settings - Fork 358
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 #1241 - RalfJung:dont-panic, r=RalfJung
whitelist platforms where panicking should work @CAD97 [proposed](#1059 (comment)) trying to get a better error for failed panics on Windows. Could you test if this works for you?
- Loading branch information
Showing
6 changed files
with
45 additions
and
0 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
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,9 @@ | ||
// ignore-linux | ||
// ignore-macos | ||
|
||
// Test that panics on Windows give a reasonable error message. | ||
|
||
// error-pattern: panicking is not supported on this platform | ||
fn main() { | ||
core::panic!("this is {}", "Windows"); | ||
} |
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,9 @@ | ||
// ignore-linux | ||
// ignore-macos | ||
|
||
// Test that panics on Windows give a reasonable error message. | ||
|
||
// error-pattern: panicking is not supported on this platform | ||
fn main() { | ||
std::panic!("this is Windows"); | ||
} |
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,10 @@ | ||
// ignore-linux | ||
// ignore-macos | ||
|
||
// Test that panics on Windows give a reasonable error message. | ||
|
||
// error-pattern: panicking is not supported on this platform | ||
#[allow(unconditional_panic)] | ||
fn main() { | ||
let _val = 1/0; | ||
} |