Fix test and move to more appropriate directory

This commit is contained in:
Esteban Küber 2023-11-06 23:43:26 +00:00
parent 0ff331bc78
commit bd1feb8cef
3 changed files with 63 additions and 37 deletions

View File

@ -1,35 +0,0 @@
error: expected identifier, found `1234test`
--> $DIR/issue-104088.rs:1:4
|
LL | fn 1234test() {
| ^^^^^^^^ expected identifier
|
help: identifiers cannot start with a number
--> $DIR/issue-104088.rs:1:4
|
LL | fn 1234test() {
| ^^^^
error: expected identifier, found `23name`
--> $DIR/issue-104088.rs:9:9
|
LL | let 23name = 123;
| ^^^^^^ expected identifier
|
help: identifiers cannot start with a number
--> $DIR/issue-104088.rs:9:9
|
LL | let 23name = 123;
| ^^
error[E0308]: mismatched types
--> $DIR/issue-104088.rs:5:12
|
LL | if let 2e1 = 123 {
| ^^^ --- this expression has type `{integer}`
| |
| expected integer, found floating-point number
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0308`.

View File

@ -8,10 +8,12 @@ fn 1234test() {
let 23name = 123; let 23name = 123;
//~^ ERROR expected identifier, found `23name` //~^ ERROR expected identifier, found `23name`
}
fn foo() {
let 2x: i32 = 123; let 2x: i32 = 123;
//~^ ERROR expected identifier, found `2x` //~^ ERROR expected identifier, found `2x`
}
fn bar() {
let 1x = 123; let 1x = 123;
//~^ ERROR expected identifier, found `1x` //~^ ERROR expected identifier, found `1x`
} }

View File

@ -0,0 +1,59 @@
error: expected identifier, found `1234test`
--> $DIR/binding-name-starting-with-number.rs:1:4
|
LL | fn 1234test() {
| ^^^^^^^^ expected identifier
|
help: identifiers cannot start with a number
--> $DIR/binding-name-starting-with-number.rs:1:4
|
LL | fn 1234test() {
| ^^^^
error: expected identifier, found `23name`
--> $DIR/binding-name-starting-with-number.rs:9:9
|
LL | let 23name = 123;
| ^^^^^^ expected identifier
|
help: identifiers cannot start with a number
--> $DIR/binding-name-starting-with-number.rs:9:9
|
LL | let 23name = 123;
| ^^
error: expected identifier, found `2x`
--> $DIR/binding-name-starting-with-number.rs:13:9
|
LL | let 2x: i32 = 123;
| ^^ expected identifier
|
help: identifiers cannot start with a number
--> $DIR/binding-name-starting-with-number.rs:13:9
|
LL | let 2x: i32 = 123;
| ^
error: expected identifier, found `1x`
--> $DIR/binding-name-starting-with-number.rs:17:9
|
LL | let 1x = 123;
| ^^ expected identifier
|
help: identifiers cannot start with a number
--> $DIR/binding-name-starting-with-number.rs:17:9
|
LL | let 1x = 123;
| ^
error[E0308]: mismatched types
--> $DIR/binding-name-starting-with-number.rs:5:12
|
LL | if let 2e1 = 123 {
| ^^^ --- this expression has type `{integer}`
| |
| expected integer, found floating-point number
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0308`.