File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1395,8 +1395,18 @@ impl<T> SizedTypeProperties for T {}
13951395///
13961396/// assert_eq!(mem::offset_of!(Option<&u8>, Some.0), 0);
13971397/// ```
1398+ #[ cfg( not( bootstrap) ) ]
13981399#[ unstable( feature = "offset_of" , issue = "106655" ) ]
13991400#[ allow_internal_unstable( builtin_syntax, hint_must_use) ]
1401+ pub macro offset_of ( $Container: ty, $( $fields: expr) + $( , ) ?) {
1402+ // The `{}` is for better error messages
1403+ crate :: hint:: must_use ( { builtin # offset_of ( $Container, $( $fields) +) } )
1404+ }
1405+
1406+ #[ cfg( bootstrap) ]
1407+ #[ unstable( feature = "offset_of" , issue = "106655" ) ]
1408+ #[ allow_internal_unstable( builtin_syntax, hint_must_use) ]
1409+ #[ allow( missing_docs) ]
14001410pub macro offset_of ( $Container: ty, $( $fields: tt) . + $( , ) ?) {
14011411 // The `{}` is for better error messages
14021412 crate :: hint:: must_use ( { builtin # offset_of ( $Container, $( $fields) . +) } )
You can’t perform that action at this time.
0 commit comments