Skip to content

Commit 9b0ddec

Browse files
committed
test(frontmatter): Show current hyphen behavior
1 parent 8c32e31 commit 9b0ddec

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--- -toml
2+
//~^ ERROR: invalid infostring for frontmatter
3+
---
4+
5+
// infostrings cannot have leading hyphens
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/hyphen-in-infostring-leading.rs:1:4
3+
|
4+
LL | --- -toml
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+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--- Cargo-toml
2+
//~^ ERROR: invalid infostring for frontmatter
3+
---
4+
5+
// infostrings cannot have hyphens
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/hyphen-in-infostring-non-leading.rs:1:4
3+
|
4+
LL | --- Cargo-toml
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)