Skip to content

Commit 06e247d

Browse files
committed
Migrate offset_of from a macro to builtin # syntax
1 parent d51b860 commit 06e247d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/mem/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,9 +1315,9 @@ impl<T> SizedTypeProperties for T {}
13151315
///
13161316
/// assert_eq!(mem::offset_of!(NestedA, b.0), 0);
13171317
/// ```
1318-
#[unstable(feature = "offset_of", issue = "106655")]
1319-
#[rustc_builtin_macro]
13201318
#[cfg(not(bootstrap))]
1319+
#[unstable(feature = "offset_of", issue = "106655")]
1320+
#[allow_internal_unstable(builtin_syntax)]
13211321
pub macro offset_of($Container:ty, $($fields:tt).+ $(,)?) {
1322-
/* compiler built-in */
1322+
builtin # offset_of($Container, $($fields).+)
13231323
}

0 commit comments

Comments
 (0)