Skip to content

Commit 45b300c

Browse files
committed
Auto merge of rust-lang#123679 - saethlin:measure-ub-checks, r=<try>
Disable assert_unsafe_precondition to measure compile-time cost r? ghost
2 parents 033becf + fbf9acf commit 45b300c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/core/src/ub_checks.rs

+2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ macro_rules! assert_unsafe_precondition {
6969
}
7070
}
7171

72+
if cfg!(debug_assertions) {
7273
if ::core::ub_checks::$kind() {
7374
precondition_check($($arg,)*);
7475
}
76+
}
7577
}
7678
};
7779
}

0 commit comments

Comments
 (0)