Skip to content

Commit bca35ef

Browse files
committed
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.
1 parent 11d2046 commit bca35ef

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--- cargo clippy
2+
//~^ ERROR: invalid infostring for frontmatter
3+
---
4+
5+
// infostrings cannot have spaces
6+
7+
#![feature(frontmatter)]
8+
9+
fn main() {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: invalid infostring for frontmatter
2+
--> $DIR/space-in-infostring.rs:1:4
3+
|
4+
LL | --- cargo clippy
5+
| ^^^^^^^^^^^^^
6+
|
7+
= note: frontmatter infostrings must be a single identifier immediately following the opening
8+
9+
error: aborting due to 1 previous error
10+

0 commit comments

Comments
 (0)