File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2573,7 +2573,10 @@ extern "rust-intrinsic" {
25732573 /// macro expansion.
25742574 ///
25752575 /// This always returns `false` in const eval and Miri. The interpreter provides better
2576- /// diagnostics than the checks that this is used to implement.
2576+ /// diagnostics than the checks that this is used to implement. However, this means
2577+ /// you should only be using this intrinsic to guard requirements that, if violated,
2578+ /// immediately lead to UB. Otherwise, const-eval and Miri will miss out on those
2579+ /// checks entirely.
25772580 ///
25782581 /// Since this is evaluated after monomorphization, branching on this value can be used to
25792582 /// implement debug assertions that are included in the precompiled standard library, but can
You can’t perform that action at this time.
0 commit comments