We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a78f58 commit 7258c89Copy full SHA for 7258c89
core/src/mem/mod.rs
@@ -1317,7 +1317,8 @@ impl<T> SizedTypeProperties for T {}
1317
/// assert_eq!(mem::offset_of!(NestedA, b.0), 0);
1318
/// ```
1319
#[unstable(feature = "offset_of", issue = "106655")]
1320
-#[allow_internal_unstable(builtin_syntax)]
+#[allow_internal_unstable(builtin_syntax, hint_must_use)]
1321
pub macro offset_of($Container:ty, $($fields:tt).+ $(,)?) {
1322
- builtin # offset_of($Container, $($fields).+)
+ // The `{}` is for better error messages
1323
+ crate::hint::must_use({builtin # offset_of($Container, $($fields).+)})
1324
}
0 commit comments