Skip to content

Implement RFC 3503: frontmatters #140035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fee1-dead
Copy link
Member

Supercedes #137193. This implements RFC 3503.

This might break rust-analyzer. Will look into how to fix that.

Suggestions welcome for how to improve diagnostics.

@rustbot
Copy link
Collaborator

rustbot commented Apr 19, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Apr 19, 2025
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] stdx test:false 0.210
    Checking parser v0.0.0 (/checkout/src/tools/rust-analyzer/crates/parser)
[RUSTC-TIMING] chalk_derive test:false 0.840
    Checking tt v0.0.0 (/checkout/src/tools/rust-analyzer/crates/tt)
error[E0004]: non-exhaustive patterns: `&TokenKind::Frontmatter { .. }` not covered
   --> src/tools/rust-analyzer/crates/parser/src/lexed_str.rs:171:19
    |
171 |             match kind {
    |                   ^^^^ pattern `&TokenKind::Frontmatter { .. }` not covered
    |
note: `TokenKind` defined here
   --> /checkout/compiler/rustc_lexer/src/lib.rs:58:1
    |
58  | pub enum TokenKind {
    | ^^^^^^^^^^^^^^^^^^
...
76  |     Frontmatter {
    |     ----------- not covered
    = note: the matched value is of type `&TokenKind`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
254 ~                 rustc_lexer::TokenKind::Eof => EOF,
255 ~                 &TokenKind::Frontmatter { .. } => todo!(),
    |

For more information about this error, try `rustc --explain E0004`.
[RUSTC-TIMING] parser test:false 0.378
error: could not compile `parser` (lib) due to 1 previous error

@jieyouxu jieyouxu added the F-frontmatter `#![feature(frontmatter)]` label Apr 19, 2025
@jieyouxu
Copy link
Member

I'll do a review pass next Monday/Tuesday, but in the meantime, I'll roll this to Wesley who I think have more context on the general vibes.

r? @wesleywiser

@rustbot rustbot assigned wesleywiser and unassigned jieyouxu Apr 19, 2025
@jieyouxu jieyouxu self-assigned this Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-frontmatter `#![feature(frontmatter)]` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants