-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit 0972fd9
Rollup merge of #145754 - epage:escape, r=SparrowLii
fix(lexer): Don't require frontmatters to be escaped with indented fences
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 #141367 (comment)
There is a regression in error message quality which I'm leaving for someone if they feel this needs improving.
Tracking issue: #136889
Fixes #141367 File tree
7 files changed
+51
-74
lines changed- compiler/rustc_lexer/src
- tests/ui/frontmatter
7 files changed
+51
-74
lines changedLines changed: 13 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
550 | 550 |
| |
551 | 551 |
| |
552 | 552 |
| |
553 | - | ||
554 | 553 |
| |
555 | - | ||
556 | - | ||
557 | - | ||
558 | - | ||
559 | - | ||
560 | - | ||
561 | - | ||
562 | - | ||
563 | - | ||
564 | - | ||
565 | - | ||
566 | - | ||
567 | - | ||
568 | - | ||
569 | - | ||
570 | - | ||
571 | - | ||
572 | - | ||
573 | - | ||
574 | - | ||
554 | + | ||
555 | + | ||
556 | + | ||
557 | + | ||
558 | + | ||
559 | + | ||
560 | + | ||
561 | + | ||
562 | + | ||
563 | + | ||
564 | + | ||
565 | + | ||
566 | + | ||
575 | 567 |
| |
576 | 568 |
| |
577 | 569 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | + | ||
3 | 4 |
| |
4 | - | ||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
|
Lines changed: 11 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 | - | ||
14 | - | ||
13 | + | ||
14 | + | ||
15 | 15 |
| |
16 | - | ||
17 | - | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
18 | 22 |
| |
19 | - | ||
20 | - | ||
23 | + | ||
24 | + | ||
21 | 25 |
| |
22 | 26 |
| |
23 | - | ||
27 | + | ||
24 | 28 |
| |
25 | 29 |
| |
26 | 30 |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | + | ||
2 | 3 |
| |
3 | 4 |
| |
4 | 5 |
| |
5 | 6 |
| |
6 | 7 |
| |
7 | 8 |
| |
8 | 9 |
| |
9 | - | ||
10 | - | ||
10 | + | ||
11 | 11 |
| |
12 | - | ||
13 | 12 |
| |
14 | 13 |
| |
15 | 14 |
|
Lines changed: 21 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | - | ||
2 | - | ||
1 | + | ||
2 | + | ||
3 | 3 |
| |
4 | - | ||
5 | - | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
6 | 8 |
| |
7 | - | ||
8 | - | ||
9 | + | ||
10 | + | ||
9 | 11 |
| |
10 | - | ||
11 | - | ||
12 | + | ||
13 | + | ||
12 | 14 |
| |
13 | - | ||
14 | - | ||
15 | + | ||
16 | + | ||
15 | 17 |
| |
16 | 18 |
| |
17 | - | ||
18 | - | ||
19 | - | ||
20 | - | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
21 | 25 |
| |
22 | - | ||
23 | - | ||
26 | + | ||
27 | + | ||
24 | 28 |
| |
25 | - | ||
29 | + | ||
26 | 30 |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | - | ||
4 | 3 |
| |
5 | 4 |
| |
6 | - | ||
7 | - | ||
8 | 5 |
| |
9 | 6 |
| |
7 | + | ||
8 | + | ||
9 | + | ||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
|
Lines changed: 0 additions & 22 deletions
This file was deleted.
0 commit comments