File tree Expand file tree Collapse file tree 3 files changed +40
-3
lines changed Expand file tree Collapse file tree 3 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -3,5 +3,9 @@ use maud::html;
3
3
fn main ( ) {
4
4
html ! {
5
5
if { }
6
+ else { }
7
+ for { }
8
+ while { }
9
+ match { }
6
10
} ;
7
11
}
Original file line number Diff line number Diff line change 1
1
error: found keyword `if`
2
- --> $DIR /keyword-without-at.rs:5:9
2
+ --> tests/warnings /keyword-without-at.rs:5:9
3
3
|
4
4
5 | if {}
5
5
| ^^
6
6
|
7
- = help: should this be a `@if`?
7
+ = help: should this be `@if`?
8
+
9
+ error: found keyword `else`
10
+ --> tests/warnings/keyword-without-at.rs:6:9
11
+ |
12
+ 6 | else {}
13
+ | ^^^^
14
+ |
15
+ = help: should this be `@else`?
16
+
17
+ error: found keyword `for`
18
+ --> tests/warnings/keyword-without-at.rs:7:9
19
+ |
20
+ 7 | for {}
21
+ | ^^^
22
+ |
23
+ = help: should this be `@for`?
24
+
25
+ error: found keyword `while`
26
+ --> tests/warnings/keyword-without-at.rs:8:9
27
+ |
28
+ 8 | while {}
29
+ | ^^^^^
30
+ |
31
+ = help: should this be `@while`?
32
+
33
+ error: found keyword `match`
34
+ --> tests/warnings/keyword-without-at.rs:9:9
35
+ |
36
+ 9 | match {}
37
+ | ^^^^^
38
+ |
39
+ = help: should this be `@match`?
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ impl<E: MaybeElement> Markup<E> {
60
60
) -> syn:: Result < Self > {
61
61
if input. peek ( Let )
62
62
|| input. peek ( If )
63
+ || input. peek ( Else )
63
64
|| input. peek ( For )
64
65
|| input. peek ( While )
65
66
|| input. peek ( Match )
@@ -68,7 +69,7 @@ impl<E: MaybeElement> Markup<E> {
68
69
diagnostics. push (
69
70
kw. span ( )
70
71
. error ( format ! ( "found keyword `{kw}`" ) )
71
- . help ( format ! ( "should this be a `@{kw}`?" ) ) ,
72
+ . help ( format ! ( "should this be `@{kw}`?" ) ) ,
72
73
) ;
73
74
}
74
75
You can’t perform that action at this time.
0 commit comments