-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.F-frontmatter`#![feature(frontmatter)]``#![feature(frontmatter)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
tests/ui/frontmatter/multifrontmatter-2.rs:
---
---
//~^ ERROR: invalid preceding whitespace for frontmatter close
---
//~^ ERROR: expected item, found `-`
// FIXME(frontmatter): make this diagnostic better
---
#![feature(frontmatter)]
fn main() {}
I expected to see this happen: this should be a //@ check-pass
Instead, this happened: this is an ERROR
Meta
As of #140035 (I had missed this test in the review)
The RFC text says:
All content is ignored by rustc until the same number of dashes is found at the start of a line. The line must terminate by 0+ whitespace and then a newline.
So a line with spaces before a ---
should not require escapaing (more -
on open/close) but should work just fine.
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.F-frontmatter`#![feature(frontmatter)]``#![feature(frontmatter)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.