Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
macros
/
rfc-2011-nicer-assert-messages
/
assert-with-custom-errors-does-not-create-unnecessary-code.rs
blob: 37d94830db2cff35ef6a4717d88f7c022f574179 [
file
] [
log
] [
blame
]
//@ compile-flags: --test
//@ run-pass
#![
feature
(
core_intrinsics
,
generic_assert
)]
#[
should_panic
(
expected
=
"Custom user message"
)]
#[
test
]
fn
test
()
{
assert
!(
1
==
3
,
"Custom user message"
);
}
fn
main
()
{
}