The RFC only limits hyphens at the beginning of lines and not if they are indented or embedded in other content. Sticking to that approach was confirmed by the T-lang liason at https://github.com/rust-lang/rust/issues/141367#issuecomment-3202217544 There is a regression in error message quality which I'm leaving for someone if they feel this needs improving.
11 lines
231 B
Rust
11 lines
231 B
Rust
---
|
|
//~^ ERROR: invalid preceding whitespace for frontmatter opening
|
|
//~^^ ERROR: unclosed frontmatter
|
|
---
|
|
|
|
#![feature(frontmatter)]
|
|
|
|
// check that whitespaces should not precede the frontmatter opening or close.
|
|
|
|
fn main() {}
|