mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-30 08:16:56 +00:00

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.
31 lines
562 B
Plaintext
31 lines
562 B
Plaintext
error: invalid preceding whitespace for frontmatter opening
|
|
--> $DIR/frontmatter-whitespace-1.rs:1:1
|
|
|
|
|
LL | ---
|
|
| ^^^^^
|
|
|
|
|
note: frontmatter opening should not be preceded by whitespace
|
|
--> $DIR/frontmatter-whitespace-1.rs:1:1
|
|
|
|
|
LL | ---
|
|
| ^^
|
|
|
|
error: unclosed frontmatter
|
|
--> $DIR/frontmatter-whitespace-1.rs:1:3
|
|
|
|
|
LL | / ---
|
|
LL | |
|
|
LL | |
|
|
LL | | ---
|
|
LL | |
|
|
| |_^
|
|
|
|
|
note: frontmatter opening here was not closed
|
|
--> $DIR/frontmatter-whitespace-1.rs:1:3
|
|
|
|
|
LL | ---
|
|
| ^^^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|