rust/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs

14 lines
213 B
Rust
Raw Normal View History

// compile-flags: --test
// run-pass
2023-05-24 19:15:50 -05:00
#![feature(core_intrinsics, generic_assert)]
#[should_panic(expected = "Custom user message")]
#[test]
fn test() {
assert!(1 == 3, "Custom user message");
}
fn main() {
}