mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-07 04:38:46 +00:00
16 lines
346 B
Rust
16 lines
346 B
Rust
// -Zpanic_abort_tests makes this test work on panic=abort targets and
|
|
// it's a no-op on panic=unwind targets
|
|
//@ compile-flags: --test -Zpanic_abort_tests
|
|
//@ run-pass
|
|
|
|
#![feature(core_intrinsics, generic_assert)]
|
|
|
|
#[should_panic(expected = "Custom user message")]
|
|
#[test]
|
|
fn test() {
|
|
assert!(1 == 3, "Custom user message");
|
|
}
|
|
|
|
fn main() {
|
|
}
|