We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73bf794 commit fc62e32Copy full SHA for fc62e32
library/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 is a BUG IN THE PROGRAM that must be corrected.\n\
+ This Undefined Behavior check is optional, and cannot be relied on for safety."));
71
}
72
73
0 commit comments