Open
Description
This is a tracking issue for the MCP to add builtin #
syntax, see rust-lang/compiler-team#580 as well as the zulip stream.
The feature gate for the issue is #![feature(builtin_syntax)]
.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Implement a scaffolding for the
builtin #
syntax: Implement builtin # syntax and use it for offset_of!(...) #110694 - Adopt
builtin #
syntax in the qualifying places:-
offset_of!
: Implement builtin # syntax and use it for offset_of!(...) #110694 -
type_ascribe!
: Maketype_ascribe!
not a built-in #122806 -
deref!(PAT)
Implement macro-based deref!() syntax for deref patterns #122793 -
asm!
/global_asm!
-
format_args!
- (the list is incomplete)
-
- There will never be a general stabilization. The sub-syntaxes should be exposed stably in other ways to end users, for example through macros. Alternatively, the syntax should be changed before stabilization to something that doesn't use
builtin #
. In any way, stabilization is specific to each feature that usesbuiltin #
.
Unresolved Questions
The MCP lists a few potential use cases for builtin #
, but the list is not final (and probably will keep changing).