1
Fork 0

Rollup merge of #110694 - est31:builtin, r=petrochenkov

Implement builtin # syntax and use it for offset_of!(...)

Add `builtin #` syntax to the parser, as well as a generic infrastructure to support both item and expression position builtin syntaxes. The PR also uses this infrastructure for the implementation of the `offset_of!` macro, added by #106934.

cc `@petrochenkov` `@DrMeepster`

cc #110680 `builtin #` tracking issue
cc #106655 `offset_of!` tracking issue
This commit is contained in:
Dylan DPC 2023-05-09 12:33:45 +05:30 committed by GitHub
commit dbd090c655
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 333 additions and 136 deletions

View file

@ -95,6 +95,7 @@ symbols! {
// Weak keywords, have special meaning only in specific contexts.
Auto: "auto",
Builtin: "builtin",
Catch: "catch",
Default: "default",
MacroRules: "macro_rules",
@ -440,6 +441,7 @@ symbols! {
breakpoint,
bridge,
bswap,
builtin_syntax,
c_str,
c_str_literals,
c_unwind,