We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb0517f commit 55d3538Copy full SHA for 55d3538
core/src/ub_checks.rs
@@ -65,9 +65,9 @@ macro_rules! assert_unsafe_precondition {
65
#[rustc_nounwind]
66
const fn precondition_check($($name:$ty),*) {
67
if !$e {
68
- ::core::panicking::panic_nounwind(
69
- concat!("unsafe precondition(s) violated: ", $message)
70
- );
+ ::core::panicking::panic_nounwind(concat!("unsafe precondition(s) violated: ", $message,
+ "\n\nThis indicates a bug in the program. \
+ This Undefined Behavior check is optional, and cannot be relied on for safety."));
71
}
72
73
0 commit comments