Tracking Issue for frontmatter
#136889
Labels
B-RFC-approved
Blocker: Approved by a merged RFC but not yet implemented.
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
F-frontmatter
`#![feature(frontmatter)]`
S-tracking-unimplemented
Status: The feature has not been implemented.
T-cargo
Relevant to the cargo team, which will review and decide on the PR/issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
This is a tracking issue for the RFC "frontmatter" (rust-lang/rfcs#3503).
The feature gate for the issue is
#![feature(frontmatter)]
.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.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
Test coverage prior to stabilization
In the following, the RFC text in its accepted form will be referred to as the "accepted text".
run-make
test that exercises how cargo and rustc works together w.r.t. frontmatter, depending on what the final cooperation scheme we end up using.rustfix
is able to account for frontmatters (or properly ignore), i.e.//@ run-rustfix
.Unresolved Questions
$tools
<-> rustc.-Zunpretty
? See discussions in Add unstable frontmatter support #137193 (comment).rust-analyzer
,rustfmt
,cargo
,clippy
) handle frontmatter (and interop w/rustc
)? Will parsing support (or ability to ignore frontmatter) be a stabilization blocker (re. toolchain UX)? For all of them, for a subset of the tools?--- cargo
be accepted? In Implement RFC 3503: frontmatters #140035 and the accepted text, whitespace between starting dashes and the infostring is permitted.Implementation history
Initial implementations
(Significant) changes since the RFC was accepted
Frontmatter opener vs infostring starting with
-
character grammar ambiguityThe accepted text has a grammar ambiguity in the case where the infostring starts with a
-
.-
character is used to delimit the frontmatter "opener"---
.-
characters to support escaping nesting of---
s within the frontmatter.-
, making it ambiguous as to whether it's a 3--
opener +-
-starting infostring, or if it is a 4--
opener + infostring.Remedy: we can require the infostring to begin with Unicode
XID_Start
, then permit subsequently characters in the set {XID_Continue
,.
}. I.e. (illustrative)See discussions at #140035 (comment).
.
in e.g.file.ext
(see RFC: Syntax for embedding cargo-script manifests rfcs#3503 (comment)).Illustrative grammar
#140035 (comment) (with start and end dashes >3
-
characters and must match in-
count):The text was updated successfully, but these errors were encountered: