Skip to content

Commit 6c90f92

Browse files
committed
Fix test and move to more appropriate directory
1 parent 0ef0cc4 commit 6c90f92

File tree

3 files changed

+63
-37
lines changed

3 files changed

+63
-37
lines changed

tests/ui/parser/issues/issue-104088.stderr

-35
This file was deleted.

tests/ui/parser/issues/issue-104088.rs renamed to tests/ui/parser/recover/binding-name-starting-with-number.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ fn 1234test() {
88

99
let 23name = 123;
1010
//~^ ERROR expected identifier, found `23name`
11-
11+
}
12+
fn foo() {
1213
let 2x: i32 = 123;
1314
//~^ ERROR expected identifier, found `2x`
14-
15+
}
16+
fn bar() {
1517
let 1x = 123;
1618
//~^ ERROR expected identifier, found `1x`
1719
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
error: expected identifier, found `1234test`
2+
--> $DIR/binding-name-starting-with-number.rs:1:4
3+
|
4+
LL | fn 1234test() {
5+
| ^^^^^^^^ expected identifier
6+
|
7+
help: identifiers cannot start with a number
8+
--> $DIR/binding-name-starting-with-number.rs:1:4
9+
|
10+
LL | fn 1234test() {
11+
| ^^^^
12+
13+
error: expected identifier, found `23name`
14+
--> $DIR/binding-name-starting-with-number.rs:9:9
15+
|
16+
LL | let 23name = 123;
17+
| ^^^^^^ expected identifier
18+
|
19+
help: identifiers cannot start with a number
20+
--> $DIR/binding-name-starting-with-number.rs:9:9
21+
|
22+
LL | let 23name = 123;
23+
| ^^
24+
25+
error: expected identifier, found `2x`
26+
--> $DIR/binding-name-starting-with-number.rs:13:9
27+
|
28+
LL | let 2x: i32 = 123;
29+
| ^^ expected identifier
30+
|
31+
help: identifiers cannot start with a number
32+
--> $DIR/binding-name-starting-with-number.rs:13:9
33+
|
34+
LL | let 2x: i32 = 123;
35+
| ^
36+
37+
error: expected identifier, found `1x`
38+
--> $DIR/binding-name-starting-with-number.rs:17:9
39+
|
40+
LL | let 1x = 123;
41+
| ^^ expected identifier
42+
|
43+
help: identifiers cannot start with a number
44+
--> $DIR/binding-name-starting-with-number.rs:17:9
45+
|
46+
LL | let 1x = 123;
47+
| ^
48+
49+
error[E0308]: mismatched types
50+
--> $DIR/binding-name-starting-with-number.rs:5:12
51+
|
52+
LL | if let 2e1 = 123 {
53+
| ^^^ --- this expression has type `{integer}`
54+
| |
55+
| expected integer, found floating-point number
56+
57+
error: aborting due to 5 previous errors
58+
59+
For more information about this error, try `rustc --explain E0308`.

0 commit comments

Comments
 (0)