Skip to content

Commit a86aac1

Browse files
committed
add tests
1 parent 726aa14 commit a86aac1

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

src/test/ui/issues/issue-62554.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fn main() {}
2+
3+
fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
4+
//~^ ERROR expected `{`, found `macro_rules`
5+
//~ ERROR this file contains an un-closed delimiter

src/test/ui/issues/issue-62554.stderr

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
error: this file contains an un-closed delimiter
2+
--> $DIR/issue-62554.rs:5:53
3+
|
4+
LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
5+
| - - - - - un-closed delimiter
6+
| | | | |
7+
| | | | un-closed delimiter
8+
| | | un-closed delimiter
9+
| un-closed delimiter un-closed delimiter
10+
LL |
11+
LL |
12+
| ^
13+
14+
error: expected `{`, found `macro_rules`
15+
--> $DIR/issue-62554.rs:3:23
16+
|
17+
LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
18+
| -- ^^^^^^^^^^^ expected `{`
19+
| |
20+
| this `if` statement has a condition, but no block
21+
help: try placing this code inside a block
22+
|
23+
LL | fn foo(u: u8) { if u8 { macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
24+
LL |
25+
LL |
26+
LL | }
27+
|
28+
29+
error: aborting due to 2 previous errors
30+

0 commit comments

Comments
 (0)