test(frontmatter): Cover spaces between infostring parts

As these characters are specifically called out in the RFC, I felt it
would be important to have a test to cover them.
This commit is contained in:
Ed Page 2025-10-23 11:47:53 -05:00
parent 11d2046fe9
commit bca35effc2
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,9 @@
--- cargo clippy
//~^ ERROR: invalid infostring for frontmatter
---
// infostrings cannot have spaces
#![feature(frontmatter)]
fn main() {}

View file

@ -0,0 +1,10 @@
error: invalid infostring for frontmatter
--> $DIR/space-in-infostring.rs:1:4
|
LL | --- cargo clippy
| ^^^^^^^^^^^^^
|
= note: frontmatter infostrings must be a single identifier immediately following the opening
error: aborting due to 1 previous error