Skip to content

Commit fbf9acf

Browse files
committed
Disable assert_unsafe_precondition to measure compile-time cost
1 parent ff24ef9 commit fbf9acf

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)