57
57
use crate :: marker:: DiscriminantKind ;
58
58
use crate :: marker:: Tuple ;
59
59
use crate :: mem:: align_of;
60
+ #[ cfg( doc) ]
61
+ use core:: mem;
60
62
61
63
pub mod mir;
62
64
pub mod simd;
@@ -2597,7 +2599,7 @@ pub(crate) const fn debug_assertions() -> bool {
2597
2599
/// These checks are behind a condition which is evaluated at codegen time, not expansion time like
2598
2600
/// [`debug_assert`]. This means that a standard library built with optimizations and debug
2599
2601
/// assertions disabled will have these checks optimized out of its monomorphizations, but if a
2600
- /// a caller of the standard library has debug assertions enabled and monomorphizes an expansion of
2602
+ /// caller of the standard library has debug assertions enabled and monomorphizes an expansion of
2601
2603
/// this macro, that monomorphization will contain the check.
2602
2604
///
2603
2605
/// Since these checks cannot be optimized out in MIR, some care must be taken in both call and
@@ -2606,8 +2608,8 @@ pub(crate) const fn debug_assertions() -> bool {
2606
2608
/// combination of properties ensures that the code for the checks is only compiled once, and has a
2607
2609
/// minimal impact on the caller's code size.
2608
2610
///
2609
- /// Caller should also introducing any other `let` bindings or any code outside this macro in order
2610
- /// to call it. Since the precompiled standard library is built with full debuginfo and these
2611
+ /// Callers should also avoid introducing any other `let` bindings or any code outside this macro in
2612
+ /// order to call it. Since the precompiled standard library is built with full debuginfo and these
2611
2613
/// variables cannot be optimized out in MIR, an innocent-looking `let` can produce enough
2612
2614
/// debuginfo to have a measurable compile-time impact on debug builds.
2613
2615
///
0 commit comments