about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-04-19 15:30:34 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-07-02 20:35:50 +0300
commit64a88db762bc13b37508d44e09731a3b8349110a (patch)
tree98402628dfdc6ecb87c25267e602358fd01928e9
parent63f95a4858bbe8cef9a6e1b0e7e5273255d60926 (diff)
downloadrust-64a88db762bc13b37508d44e09731a3b8349110a.tar.gz
rust-64a88db762bc13b37508d44e09731a3b8349110a.zip
Update dtolnay's tests that now work
-rw-r--r--src/test/ui/tuple/index-float.rs6
-rw-r--r--src/test/ui/tuple/index-float.stderr14
-rw-r--r--src/test/ui/tuple/index-invalid.stderr8
-rw-r--r--src/test/ui/tuple/indexing-in-macro.rs4
-rw-r--r--src/test/ui/tuple/indexing-in-macro.stderr11
5 files changed, 10 insertions, 33 deletions
diff --git a/src/test/ui/tuple/index-float.rs b/src/test/ui/tuple/index-float.rs
index 673d32e4d43..85b088d664d 100644
--- a/src/test/ui/tuple/index-float.rs
+++ b/src/test/ui/tuple/index-float.rs
@@ -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
 }
diff --git a/src/test/ui/tuple/index-float.stderr b/src/test/ui/tuple/index-float.stderr
deleted file mode 100644
index 505b91e5bbb..00000000000
--- a/src/test/ui/tuple/index-float.stderr
+++ /dev/null
@@ -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
-
diff --git a/src/test/ui/tuple/index-invalid.stderr b/src/test/ui/tuple/index-invalid.stderr
index 8d22f458a6c..800b5a31d98 100644
--- a/src/test/ui/tuple/index-invalid.stderr
+++ b/src/test/ui/tuple/index-invalid.stderr
@@ -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
 
diff --git a/src/test/ui/tuple/indexing-in-macro.rs b/src/test/ui/tuple/indexing-in-macro.rs
index 89696cd7fcf..bef4a69ab23 100644
--- a/src/test/ui/tuple/indexing-in-macro.rs
+++ b/src/test/ui/tuple/indexing-in-macro.rs
@@ -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() {}
diff --git a/src/test/ui/tuple/indexing-in-macro.stderr b/src/test/ui/tuple/indexing-in-macro.stderr
deleted file mode 100644
index 78879262b01..00000000000
--- a/src/test/ui/tuple/indexing-in-macro.stderr
+++ /dev/null
@@ -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
-