about summary refs log tree commit diff
path: root/tests/ui/macros/rfc-2011-nicer-assert-messages/assert-with-custom-errors-does-not-create-unnecessary-code.rs
blob: 2a27164f9cba2eafeb22be4203152773b6f289b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// -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() {
}