Skip to content

feature(frontmatter) allows vertical whitespace where only horizontal whitespace is intended #145971

@epage

Description

@epage

I tried this code:

---\vcargo
---

fn main() {}

I expected to see this happen: error

Instead, this happened: its accepted

This is a shortcoming of the RFC which used a loose term "whitespace" which tends to mean to rustc Pattern_White_Space when only the sub-category of horizontal whitespace was intended

Meta

rustc --version --verbose:

rustc 1.91.0-nightly (54c581243 2025-08-25)
binary: rustc
commit-hash: 54c581243c977c7662c949b5795c31147f8a60ed
commit-date: 2025-08-25
host: x86_64-unknown-linux-gnu
release: 1.91.0-nightly
LLVM version: 21.1.0
Backtrace

<backtrace>

Metadata

Metadata

Assignees

Labels

A-frontendArea: Compiler frontend (errors, parsing and HIR)C-bugCategory: This is a bug.F-frontmatter`#![feature(frontmatter)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions