summaryrefslogtreecommitdiffstats
path: root/library/core/src/mem/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src/mem/mod.rs')
-rw-r--r--library/core/src/mem/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs
index afbfd6d36..2fff3f0ef 100644
--- a/library/core/src/mem/mod.rs
+++ b/library/core/src/mem/mod.rs
@@ -968,7 +968,7 @@ pub const fn replace<T>(dest: &mut T, src: T) -> T {
/// Integers and other types implementing [`Copy`] are unaffected by `drop`.
///
/// ```
-/// # #![cfg_attr(not(bootstrap), allow(dropping_copy_types))]
+/// # #![allow(dropping_copy_types)]
/// #[derive(Copy, Clone)]
/// struct Foo(u8);
///
@@ -1316,9 +1316,9 @@ impl<T> SizedTypeProperties for T {}
///
/// assert_eq!(mem::offset_of!(NestedA, b.0), 0);
/// ```
-#[cfg(not(bootstrap))]
#[unstable(feature = "offset_of", issue = "106655")]
-#[allow_internal_unstable(builtin_syntax)]
+#[allow_internal_unstable(builtin_syntax, hint_must_use)]
pub macro offset_of($Container:ty, $($fields:tt).+ $(,)?) {
- builtin # offset_of($Container, $($fields).+)
+ // The `{}` is for better error messages
+ crate::hint::must_use({builtin # offset_of($Container, $($fields).+)})
}