Update dtolnay's tests that now work

This commit is contained in:
Vadim Petrochenkov 2020-04-19 15:30:34 +03:00
parent 63f95a4858
commit 64a88db762
5 changed files with 10 additions and 33 deletions

View File

@ -1,7 +1,9 @@
// check-pass
fn main() {
let tuple = (((),),);
let _ = tuple. 0.0; //~ ERROR unexpected token: `0.0`
let _ = tuple. 0.0; // OK, whitespace
let _ = tuple./*special cases*/0.0; //~ ERROR unexpected token: `0.0`
let _ = tuple./*special cases*/0.0; // OK, comment
}

View File

@ -1,14 +0,0 @@
error: unexpected token: `0.0`
--> $DIR/index-float.rs:4:20
|
LL | let _ = tuple. 0.0;
| ^^^
error: unexpected token: `0.0`
--> $DIR/index-float.rs:6:36
|
LL | let _ = tuple./*special cases*/0.0;
| ^^^
error: aborting due to 2 previous errors

View File

@ -2,19 +2,19 @@ error[E0609]: no field `1` on type `(((),),)`
--> $DIR/index-invalid.rs:2:22
|
LL | let _ = (((),),).1.0;
| ^
| ^^^
error[E0609]: no field `1` on type `((),)`
--> $DIR/index-invalid.rs:4:24
--> $DIR/index-invalid.rs:4:22
|
LL | let _ = (((),),).0.1;
| ^
| ^^^
error[E0609]: no field `000` on type `(((),),)`
--> $DIR/index-invalid.rs:6:22
|
LL | let _ = (((),),).000.000;
| ^^^
| ^^^^^^^
error: aborting due to 3 previous errors

View File

@ -1,9 +1,9 @@
// Broken by https://github.com/rust-lang/rust/pull/70420.
// check-pass
macro_rules! m {
(.$l:literal) => {};
}
m!(.0.0); //~ ERROR no rules expected the token `.`
m!(.0.0); // OK, `0.0` after a dot is still a float token.
fn main() {}

View File

@ -1,11 +0,0 @@
error: no rules expected the token `.`
--> $DIR/indexing-in-macro.rs:7:6
|
LL | macro_rules! m {
| -------------- when calling this macro
...
LL | m!(.0.0);
| ^ no rules expected this token in macro call
error: aborting due to previous error