]> git.lizzy.rs Git - rust.git/commitdiff
Move more parsing tests to ui/parser
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Sat, 20 Oct 2018 20:53:16 +0000 (23:53 +0300)
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Sun, 21 Oct 2018 11:06:28 +0000 (14:06 +0300)
56 files changed:
src/test/ui/did_you_mean/match-refactor-to-expr.rs [deleted file]
src/test/ui/did_you_mean/match-refactor-to-expr.stderr [deleted file]
src/test/ui/issue-10636-1.rs [deleted file]
src/test/ui/issue-10636-1.stderr [deleted file]
src/test/ui/issue-2354.rs [deleted file]
src/test/ui/issue-2354.stderr [deleted file]
src/test/ui/parser/bounds-obj-parens.rs [new file with mode: 0644]
src/test/ui/parser/bounds-obj-parens.stderr [new file with mode: 0644]
src/test/ui/parser/impl-parsing.rs [new file with mode: 0644]
src/test/ui/parser/impl-parsing.stderr [new file with mode: 0644]
src/test/ui/parser/issue-10636-1.rs [new file with mode: 0644]
src/test/ui/parser/issue-10636-1.stderr [new file with mode: 0644]
src/test/ui/parser/issue-10636-2.rs [new file with mode: 0644]
src/test/ui/parser/issue-10636-2.stderr [new file with mode: 0644]
src/test/ui/parser/issue-15980.rs [new file with mode: 0644]
src/test/ui/parser/issue-15980.stderr [new file with mode: 0644]
src/test/ui/parser/issue-2354.rs [new file with mode: 0644]
src/test/ui/parser/issue-2354.stderr [new file with mode: 0644]
src/test/ui/parser/issue-41155.rs [new file with mode: 0644]
src/test/ui/parser/issue-41155.stderr [new file with mode: 0644]
src/test/ui/parser/macro-incomplete-parse.rs [new file with mode: 0644]
src/test/ui/parser/macro-incomplete-parse.stderr [new file with mode: 0644]
src/test/ui/parser/match-refactor-to-expr.rs [new file with mode: 0644]
src/test/ui/parser/match-refactor-to-expr.stderr [new file with mode: 0644]
src/test/ui/parser/raw/raw-literal-keywords.rs [new file with mode: 0644]
src/test/ui/parser/raw/raw-literal-keywords.stderr [new file with mode: 0644]
src/test/ui/parser/raw/raw-literal-self.rs [new file with mode: 0644]
src/test/ui/parser/raw/raw-literal-self.stderr [new file with mode: 0644]
src/test/ui/parser/raw/raw-literal-underscore.rs [new file with mode: 0644]
src/test/ui/parser/raw/raw-literal-underscore.stderr [new file with mode: 0644]
src/test/ui/parser/raw/raw_string.rs [new file with mode: 0644]
src/test/ui/parser/raw/raw_string.stderr [new file with mode: 0644]
src/test/ui/parser/trailing-plus-in-bounds.rs [new file with mode: 0644]
src/test/ui/parser/trailing-plus-in-bounds.stderr [new file with mode: 0644]
src/test/ui/raw/raw-literal-keywords.rs [deleted file]
src/test/ui/raw/raw-literal-keywords.stderr [deleted file]
src/test/ui/raw/raw-literal-self.rs [deleted file]
src/test/ui/raw/raw-literal-self.stderr [deleted file]
src/test/ui/raw/raw-literal-underscore.rs [deleted file]
src/test/ui/raw/raw-literal-underscore.stderr [deleted file]
src/test/ui/raw/raw_string.rs [deleted file]
src/test/ui/raw/raw_string.stderr [deleted file]
src/test/ui/span/impl-parsing.rs [deleted file]
src/test/ui/span/impl-parsing.stderr [deleted file]
src/test/ui/token/bounds-obj-parens.rs [deleted file]
src/test/ui/token/bounds-obj-parens.stderr [deleted file]
src/test/ui/token/issue-10636-2.rs [deleted file]
src/test/ui/token/issue-10636-2.stderr [deleted file]
src/test/ui/token/issue-15980.rs [deleted file]
src/test/ui/token/issue-15980.stderr [deleted file]
src/test/ui/token/issue-41155.rs [deleted file]
src/test/ui/token/issue-41155.stderr [deleted file]
src/test/ui/token/macro-incomplete-parse.rs [deleted file]
src/test/ui/token/macro-incomplete-parse.stderr [deleted file]
src/test/ui/token/trailing-plus-in-bounds.rs [deleted file]
src/test/ui/token/trailing-plus-in-bounds.stderr [deleted file]

diff --git a/src/test/ui/did_you_mean/match-refactor-to-expr.rs b/src/test/ui/did_you_mean/match-refactor-to-expr.rs
deleted file mode 100644 (file)
index 3c88608..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn main() {
-    let foo =
-        match
-        Some(4).unwrap_or_else(5)
-        //~^ NOTE expected one of `.`, `?`, `{`, or an operator here
-        ; //~ NOTE unexpected token
-        //~^ ERROR expected one of `.`, `?`, `{`, or an operator, found `;`
-
-    println!("{}", foo)
-}
diff --git a/src/test/ui/did_you_mean/match-refactor-to-expr.stderr b/src/test/ui/did_you_mean/match-refactor-to-expr.stderr
deleted file mode 100644 (file)
index ecca781..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-error: expected one of `.`, `?`, `{`, or an operator, found `;`
-  --> $DIR/match-refactor-to-expr.rs:18:9
-   |
-LL |         match
-   |         ----- help: try removing this `match`
-LL |         Some(4).unwrap_or_else(5)
-   |                                  - expected one of `.`, `?`, `{`, or an operator here
-LL |         //~^ NOTE expected one of `.`, `?`, `{`, or an operator here
-LL |         ; //~ NOTE unexpected token
-   |         ^ unexpected token
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/issue-10636-1.rs b/src/test/ui/issue-10636-1.rs
deleted file mode 100644 (file)
index 375b951..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-struct Obj {
-    //~^ NOTE: un-closed delimiter
-    member: usize
-)
-//~^ ERROR incorrect close delimiter
-//~| NOTE incorrect close delimiter
-
-fn main() {}
diff --git a/src/test/ui/issue-10636-1.stderr b/src/test/ui/issue-10636-1.stderr
deleted file mode 100644 (file)
index 49b6d08..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-error: incorrect close delimiter: `)`
-  --> $DIR/issue-10636-1.rs:16:1
-   |
-LL | struct Obj {
-   |            - un-closed delimiter
-...
-LL | )
-   | ^ incorrect close delimiter
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/issue-2354.rs b/src/test/ui/issue-2354.rs
deleted file mode 100644 (file)
index 35fddcb..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn foo() { //~ NOTE un-closed delimiter
-  match Some(x) {
-  //~^ NOTE this delimiter might not be properly closed...
-      Some(y) => { panic!(); }
-      None => { panic!(); }
-}
-//~^ NOTE ...as it matches this but it has different indentation
-
-fn bar() {
-    let mut i = 0;
-    while (i < 1000) {}
-}
-
-fn main() {} //~ ERROR this file contains an un-closed delimiter
diff --git a/src/test/ui/issue-2354.stderr b/src/test/ui/issue-2354.stderr
deleted file mode 100644 (file)
index 9cf569b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-error: this file contains an un-closed delimiter
-  --> $DIR/issue-2354.rs:26:66
-   |
-LL | fn foo() { //~ NOTE un-closed delimiter
-   |          - un-closed delimiter
-LL |   match Some(x) {
-   |                 - this delimiter might not be properly closed...
-...
-LL | }
-   | - ...as it matches this but it has different indentation
-...
-LL | fn main() {} //~ ERROR this file contains an un-closed delimiter
-   |                                                                  ^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/parser/bounds-obj-parens.rs b/src/test/ui/parser/bounds-obj-parens.rs
new file mode 100644 (file)
index 0000000..9617df8
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+type A = Box<(Fn(D::Error) -> E) + 'static + Send + Sync>; // OK (but see #39318)
+
+FAIL
+//~^ ERROR
diff --git a/src/test/ui/parser/bounds-obj-parens.stderr b/src/test/ui/parser/bounds-obj-parens.stderr
new file mode 100644 (file)
index 0000000..67dcbc4
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!` or `::`, found `<eof>`
+  --> $DIR/bounds-obj-parens.rs:15:1
+   |
+LL | FAIL
+   | ^^^^ expected one of `!` or `::` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/impl-parsing.rs b/src/test/ui/parser/impl-parsing.rs
new file mode 100644 (file)
index 0000000..064e3c3
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+impl ! {} // OK
+impl ! where u8: Copy {} // OK
+
+impl Trait Type {} //~ ERROR missing `for` in a trait impl
+impl Trait .. {} //~ ERROR missing `for` in a trait impl
+impl ?Sized for Type {} //~ ERROR expected a trait, found type
+impl ?Sized for .. {} //~ ERROR expected a trait, found type
+
+default unsafe FAIL //~ ERROR expected `impl`, found `FAIL`
diff --git a/src/test/ui/parser/impl-parsing.stderr b/src/test/ui/parser/impl-parsing.stderr
new file mode 100644 (file)
index 0000000..3cfcf7b
--- /dev/null
@@ -0,0 +1,32 @@
+error: missing `for` in a trait impl
+  --> $DIR/impl-parsing.rs:16:11
+   |
+LL | impl Trait Type {} //~ ERROR missing `for` in a trait impl
+   |           ^
+
+error: missing `for` in a trait impl
+  --> $DIR/impl-parsing.rs:17:11
+   |
+LL | impl Trait .. {} //~ ERROR missing `for` in a trait impl
+   |           ^
+
+error: expected a trait, found type
+  --> $DIR/impl-parsing.rs:18:6
+   |
+LL | impl ?Sized for Type {} //~ ERROR expected a trait, found type
+   |      ^^^^^^
+
+error: expected a trait, found type
+  --> $DIR/impl-parsing.rs:19:6
+   |
+LL | impl ?Sized for .. {} //~ ERROR expected a trait, found type
+   |      ^^^^^^
+
+error: expected `impl`, found `FAIL`
+  --> $DIR/impl-parsing.rs:21:16
+   |
+LL | default unsafe FAIL //~ ERROR expected `impl`, found `FAIL`
+   |                ^^^^ expected `impl` here
+
+error: aborting due to 5 previous errors
+
diff --git a/src/test/ui/parser/issue-10636-1.rs b/src/test/ui/parser/issue-10636-1.rs
new file mode 100644 (file)
index 0000000..375b951
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+struct Obj {
+    //~^ NOTE: un-closed delimiter
+    member: usize
+)
+//~^ ERROR incorrect close delimiter
+//~| NOTE incorrect close delimiter
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-10636-1.stderr b/src/test/ui/parser/issue-10636-1.stderr
new file mode 100644 (file)
index 0000000..49b6d08
--- /dev/null
@@ -0,0 +1,11 @@
+error: incorrect close delimiter: `)`
+  --> $DIR/issue-10636-1.rs:16:1
+   |
+LL | struct Obj {
+   |            - un-closed delimiter
+...
+LL | )
+   | ^ incorrect close delimiter
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-10636-2.rs b/src/test/ui/parser/issue-10636-2.rs
new file mode 100644 (file)
index 0000000..7118037
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2013-2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// FIXME(31528) we emit a bunch of silly errors here due to continuing past the
+// first one. This would be easy-ish to address by better recovery in tokenisation.
+
+pub fn trace_option(option: Option<isize>) {
+    option.map(|some| 42;
+                          //~^ ERROR: expected one of
+
+} //~ ERROR: incorrect close delimiter
+//~^ ERROR: expected expression, found `)`
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-10636-2.stderr b/src/test/ui/parser/issue-10636-2.stderr
new file mode 100644 (file)
index 0000000..9800b0c
--- /dev/null
@@ -0,0 +1,25 @@
+error: incorrect close delimiter: `}`
+  --> $DIR/issue-10636-2.rs:18:1
+   |
+LL | pub fn trace_option(option: Option<isize>) {
+   |                                            - close delimiter possibly meant for this
+LL |     option.map(|some| 42;
+   |               - un-closed delimiter
+...
+LL | } //~ ERROR: incorrect close delimiter
+   | ^ incorrect close delimiter
+
+error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;`
+  --> $DIR/issue-10636-2.rs:15:25
+   |
+LL |     option.map(|some| 42;
+   |                         ^ expected one of `)`, `,`, `.`, `?`, or an operator here
+
+error: expected expression, found `)`
+  --> $DIR/issue-10636-2.rs:18:1
+   |
+LL | } //~ ERROR: incorrect close delimiter
+   | ^ expected expression
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/parser/issue-15980.rs b/src/test/ui/parser/issue-15980.rs
new file mode 100644 (file)
index 0000000..e1b134c
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::io;
+
+fn main(){
+    let x: io::IoResult<()> = Ok(());
+    //~^ ERROR cannot find type `IoResult` in module `io`
+    //~| NOTE did you mean `Result`?
+    match x {
+        Err(ref e) if e.kind == io::EndOfFile {
+            //~^ NOTE while parsing this struct
+            return
+            //~^ ERROR expected identifier, found keyword `return`
+            //~| NOTE expected identifier, found keyword
+        }
+        //~^ NOTE expected one of `.`, `=>`, `?`, or an operator here
+        _ => {}
+        //~^ ERROR expected one of `.`, `=>`, `?`, or an operator, found `_`
+        //~| NOTE unexpected token
+    }
+}
diff --git a/src/test/ui/parser/issue-15980.stderr b/src/test/ui/parser/issue-15980.stderr
new file mode 100644 (file)
index 0000000..d52368b
--- /dev/null
@@ -0,0 +1,27 @@
+error: expected identifier, found keyword `return`
+  --> $DIR/issue-15980.rs:20:13
+   |
+LL |         Err(ref e) if e.kind == io::EndOfFile {
+   |                                 ------------- while parsing this struct
+LL |             //~^ NOTE while parsing this struct
+LL |             return
+   |             ^^^^^^ expected identifier, found keyword
+
+error: expected one of `.`, `=>`, `?`, or an operator, found `_`
+  --> $DIR/issue-15980.rs:25:9
+   |
+LL |         }
+   |          - expected one of `.`, `=>`, `?`, or an operator here
+LL |         //~^ NOTE expected one of `.`, `=>`, `?`, or an operator here
+LL |         _ => {}
+   |         ^ unexpected token
+
+error[E0412]: cannot find type `IoResult` in module `io`
+  --> $DIR/issue-15980.rs:14:16
+   |
+LL |     let x: io::IoResult<()> = Ok(());
+   |                ^^^^^^^^ did you mean `Result`?
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/parser/issue-2354.rs b/src/test/ui/parser/issue-2354.rs
new file mode 100644 (file)
index 0000000..35fddcb
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn foo() { //~ NOTE un-closed delimiter
+  match Some(x) {
+  //~^ NOTE this delimiter might not be properly closed...
+      Some(y) => { panic!(); }
+      None => { panic!(); }
+}
+//~^ NOTE ...as it matches this but it has different indentation
+
+fn bar() {
+    let mut i = 0;
+    while (i < 1000) {}
+}
+
+fn main() {} //~ ERROR this file contains an un-closed delimiter
diff --git a/src/test/ui/parser/issue-2354.stderr b/src/test/ui/parser/issue-2354.stderr
new file mode 100644 (file)
index 0000000..9cf569b
--- /dev/null
@@ -0,0 +1,16 @@
+error: this file contains an un-closed delimiter
+  --> $DIR/issue-2354.rs:26:66
+   |
+LL | fn foo() { //~ NOTE un-closed delimiter
+   |          - un-closed delimiter
+LL |   match Some(x) {
+   |                 - this delimiter might not be properly closed...
+...
+LL | }
+   | - ...as it matches this but it has different indentation
+...
+LL | fn main() {} //~ ERROR this file contains an un-closed delimiter
+   |                                                                  ^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/issue-41155.rs b/src/test/ui/parser/issue-41155.rs
new file mode 100644 (file)
index 0000000..7bd8506
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+impl S { //~ ERROR cannot find type
+    pub
+} //~ ERROR expected one of
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-41155.stderr b/src/test/ui/parser/issue-41155.stderr
new file mode 100644 (file)
index 0000000..5c1aae2
--- /dev/null
@@ -0,0 +1,17 @@
+error: expected one of `(`, `async`, `const`, `default`, `existential`, `extern`, `fn`, `type`, or `unsafe`, found `}`
+  --> $DIR/issue-41155.rs:13:1
+   |
+LL |     pub
+   |        - expected one of 9 possible tokens here
+LL | } //~ ERROR expected one of
+   | ^ unexpected token
+
+error[E0412]: cannot find type `S` in this scope
+  --> $DIR/issue-41155.rs:11:6
+   |
+LL | impl S { //~ ERROR cannot find type
+   |      ^ not found in this scope
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/parser/macro-incomplete-parse.rs b/src/test/ui/parser/macro-incomplete-parse.rs
new file mode 100644 (file)
index 0000000..9b8fdaf
--- /dev/null
@@ -0,0 +1,39 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z continue-parse-after-error
+
+macro_rules! ignored_item {
+    () => {
+        fn foo() {}
+        fn bar() {}
+        , //~ ERROR macro expansion ignores token `,`
+    }
+}
+
+macro_rules! ignored_expr {
+    () => ( 1,  //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
+
+            2 )
+}
+
+macro_rules! ignored_pat {
+    () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,`
+}
+
+ignored_item!();
+
+fn main() {
+    ignored_expr!();
+    match 1 {
+        ignored_pat!() => (),
+        _ => (),
+    }
+}
diff --git a/src/test/ui/parser/macro-incomplete-parse.stderr b/src/test/ui/parser/macro-incomplete-parse.stderr
new file mode 100644 (file)
index 0000000..198730d
--- /dev/null
@@ -0,0 +1,35 @@
+error: macro expansion ignores token `,` and any following
+  --> $DIR/macro-incomplete-parse.rs:17:9
+   |
+LL |         , //~ ERROR macro expansion ignores token `,`
+   |         ^
+   |
+note: caused by the macro expansion here; the usage of `ignored_item!` is likely invalid in item context
+  --> $DIR/macro-incomplete-parse.rs:31:1
+   |
+LL | ignored_item!();
+   | ^^^^^^^^^^^^^^^^
+
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
+  --> $DIR/macro-incomplete-parse.rs:22:14
+   |
+LL |     () => ( 1,  //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
+   |              ^ expected one of `.`, `;`, `?`, `}`, or an operator here
+...
+LL |     ignored_expr!();
+   |     ---------------- in this macro invocation
+
+error: macro expansion ignores token `,` and any following
+  --> $DIR/macro-incomplete-parse.rs:28:14
+   |
+LL |     () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,`
+   |              ^
+   |
+note: caused by the macro expansion here; the usage of `ignored_pat!` is likely invalid in pattern context
+  --> $DIR/macro-incomplete-parse.rs:36:9
+   |
+LL |         ignored_pat!() => (),
+   |         ^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/parser/match-refactor-to-expr.rs b/src/test/ui/parser/match-refactor-to-expr.rs
new file mode 100644 (file)
index 0000000..3c88608
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let foo =
+        match
+        Some(4).unwrap_or_else(5)
+        //~^ NOTE expected one of `.`, `?`, `{`, or an operator here
+        ; //~ NOTE unexpected token
+        //~^ ERROR expected one of `.`, `?`, `{`, or an operator, found `;`
+
+    println!("{}", foo)
+}
diff --git a/src/test/ui/parser/match-refactor-to-expr.stderr b/src/test/ui/parser/match-refactor-to-expr.stderr
new file mode 100644 (file)
index 0000000..ecca781
--- /dev/null
@@ -0,0 +1,13 @@
+error: expected one of `.`, `?`, `{`, or an operator, found `;`
+  --> $DIR/match-refactor-to-expr.rs:18:9
+   |
+LL |         match
+   |         ----- help: try removing this `match`
+LL |         Some(4).unwrap_or_else(5)
+   |                                  - expected one of `.`, `?`, `{`, or an operator here
+LL |         //~^ NOTE expected one of `.`, `?`, `{`, or an operator here
+LL |         ; //~ NOTE unexpected token
+   |         ^ unexpected token
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/raw/raw-literal-keywords.rs b/src/test/ui/parser/raw/raw-literal-keywords.rs
new file mode 100644 (file)
index 0000000..f1bfbc9
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn test_if() {
+    r#if true { } //~ ERROR found `true`
+}
+
+fn test_struct() {
+    r#struct Test; //~ ERROR found `Test`
+}
+
+fn test_union() {
+    r#union Test; //~ ERROR found `Test`
+}
diff --git a/src/test/ui/parser/raw/raw-literal-keywords.stderr b/src/test/ui/parser/raw/raw-literal-keywords.stderr
new file mode 100644 (file)
index 0000000..8a6b91b
--- /dev/null
@@ -0,0 +1,20 @@
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `true`
+  --> $DIR/raw-literal-keywords.rs:14:10
+   |
+LL |     r#if true { } //~ ERROR found `true`
+   |          ^^^^ expected one of 8 possible tokens here
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test`
+  --> $DIR/raw-literal-keywords.rs:18:14
+   |
+LL |     r#struct Test; //~ ERROR found `Test`
+   |              ^^^^ expected one of 8 possible tokens here
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test`
+  --> $DIR/raw-literal-keywords.rs:22:13
+   |
+LL |     r#union Test; //~ ERROR found `Test`
+   |             ^^^^ expected one of 8 possible tokens here
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/parser/raw/raw-literal-self.rs b/src/test/ui/parser/raw/raw-literal-self.rs
new file mode 100644 (file)
index 0000000..17496d7
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn self_test(r#self: u32) {
+    //~^ ERROR `r#self` is not currently supported.
+}
diff --git a/src/test/ui/parser/raw/raw-literal-self.stderr b/src/test/ui/parser/raw/raw-literal-self.stderr
new file mode 100644 (file)
index 0000000..f4b7593
--- /dev/null
@@ -0,0 +1,8 @@
+error: `r#self` is not currently supported.
+  --> $DIR/raw-literal-self.rs:13:14
+   |
+LL | fn self_test(r#self: u32) {
+   |              ^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/raw/raw-literal-underscore.rs b/src/test/ui/parser/raw/raw-literal-underscore.rs
new file mode 100644 (file)
index 0000000..ec33e48
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn underscore_test(r#_: u32) {
+    //~^ ERROR `r#_` is not currently supported.
+}
diff --git a/src/test/ui/parser/raw/raw-literal-underscore.stderr b/src/test/ui/parser/raw/raw-literal-underscore.stderr
new file mode 100644 (file)
index 0000000..8072eee
--- /dev/null
@@ -0,0 +1,8 @@
+error: `r#_` is not currently supported.
+  --> $DIR/raw-literal-underscore.rs:13:20
+   |
+LL | fn underscore_test(r#_: u32) {
+   |                    ^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/raw/raw_string.rs b/src/test/ui/parser/raw/raw_string.rs
new file mode 100644 (file)
index 0000000..f1eb91d
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let x = r##"lol"#;
+    //~^ ERROR unterminated raw string
+}
diff --git a/src/test/ui/parser/raw/raw_string.stderr b/src/test/ui/parser/raw/raw_string.stderr
new file mode 100644 (file)
index 0000000..ddf1cfe
--- /dev/null
@@ -0,0 +1,10 @@
+error: unterminated raw string
+  --> $DIR/raw_string.rs:12:13
+   |
+LL |     let x = r##"lol"#;
+   |             ^ unterminated raw string
+   |
+   = note: this raw string should be terminated with `"##`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/parser/trailing-plus-in-bounds.rs b/src/test/ui/parser/trailing-plus-in-bounds.rs
new file mode 100644 (file)
index 0000000..72cae6a
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only -Z continue-parse-after-error
+
+use std::fmt::Debug;
+
+fn main() {
+    let x: Box<Debug+> = box 3 as Box<Debug+>; // Trailing `+` is OK
+}
+
+FAIL
+//~^ ERROR
diff --git a/src/test/ui/parser/trailing-plus-in-bounds.stderr b/src/test/ui/parser/trailing-plus-in-bounds.stderr
new file mode 100644 (file)
index 0000000..1719b1d
--- /dev/null
@@ -0,0 +1,8 @@
+error: expected one of `!` or `::`, found `<eof>`
+  --> $DIR/trailing-plus-in-bounds.rs:19:1
+   |
+LL | FAIL
+   | ^^^^ expected one of `!` or `::` here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/raw/raw-literal-keywords.rs b/src/test/ui/raw/raw-literal-keywords.rs
deleted file mode 100644 (file)
index f1bfbc9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn test_if() {
-    r#if true { } //~ ERROR found `true`
-}
-
-fn test_struct() {
-    r#struct Test; //~ ERROR found `Test`
-}
-
-fn test_union() {
-    r#union Test; //~ ERROR found `Test`
-}
diff --git a/src/test/ui/raw/raw-literal-keywords.stderr b/src/test/ui/raw/raw-literal-keywords.stderr
deleted file mode 100644 (file)
index 8a6b91b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `true`
-  --> $DIR/raw-literal-keywords.rs:14:10
-   |
-LL |     r#if true { } //~ ERROR found `true`
-   |          ^^^^ expected one of 8 possible tokens here
-
-error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test`
-  --> $DIR/raw-literal-keywords.rs:18:14
-   |
-LL |     r#struct Test; //~ ERROR found `Test`
-   |              ^^^^ expected one of 8 possible tokens here
-
-error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test`
-  --> $DIR/raw-literal-keywords.rs:22:13
-   |
-LL |     r#union Test; //~ ERROR found `Test`
-   |             ^^^^ expected one of 8 possible tokens here
-
-error: aborting due to 3 previous errors
-
diff --git a/src/test/ui/raw/raw-literal-self.rs b/src/test/ui/raw/raw-literal-self.rs
deleted file mode 100644 (file)
index 17496d7..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn self_test(r#self: u32) {
-    //~^ ERROR `r#self` is not currently supported.
-}
diff --git a/src/test/ui/raw/raw-literal-self.stderr b/src/test/ui/raw/raw-literal-self.stderr
deleted file mode 100644 (file)
index f4b7593..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-error: `r#self` is not currently supported.
-  --> $DIR/raw-literal-self.rs:13:14
-   |
-LL | fn self_test(r#self: u32) {
-   |              ^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/raw/raw-literal-underscore.rs b/src/test/ui/raw/raw-literal-underscore.rs
deleted file mode 100644 (file)
index ec33e48..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-fn underscore_test(r#_: u32) {
-    //~^ ERROR `r#_` is not currently supported.
-}
diff --git a/src/test/ui/raw/raw-literal-underscore.stderr b/src/test/ui/raw/raw-literal-underscore.stderr
deleted file mode 100644 (file)
index 8072eee..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-error: `r#_` is not currently supported.
-  --> $DIR/raw-literal-underscore.rs:13:20
-   |
-LL | fn underscore_test(r#_: u32) {
-   |                    ^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/raw/raw_string.rs b/src/test/ui/raw/raw_string.rs
deleted file mode 100644 (file)
index f1eb91d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    let x = r##"lol"#;
-    //~^ ERROR unterminated raw string
-}
diff --git a/src/test/ui/raw/raw_string.stderr b/src/test/ui/raw/raw_string.stderr
deleted file mode 100644 (file)
index ddf1cfe..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-error: unterminated raw string
-  --> $DIR/raw_string.rs:12:13
-   |
-LL |     let x = r##"lol"#;
-   |             ^ unterminated raw string
-   |
-   = note: this raw string should be terminated with `"##`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/span/impl-parsing.rs b/src/test/ui/span/impl-parsing.rs
deleted file mode 100644 (file)
index 064e3c3..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-impl ! {} // OK
-impl ! where u8: Copy {} // OK
-
-impl Trait Type {} //~ ERROR missing `for` in a trait impl
-impl Trait .. {} //~ ERROR missing `for` in a trait impl
-impl ?Sized for Type {} //~ ERROR expected a trait, found type
-impl ?Sized for .. {} //~ ERROR expected a trait, found type
-
-default unsafe FAIL //~ ERROR expected `impl`, found `FAIL`
diff --git a/src/test/ui/span/impl-parsing.stderr b/src/test/ui/span/impl-parsing.stderr
deleted file mode 100644 (file)
index 3cfcf7b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-error: missing `for` in a trait impl
-  --> $DIR/impl-parsing.rs:16:11
-   |
-LL | impl Trait Type {} //~ ERROR missing `for` in a trait impl
-   |           ^
-
-error: missing `for` in a trait impl
-  --> $DIR/impl-parsing.rs:17:11
-   |
-LL | impl Trait .. {} //~ ERROR missing `for` in a trait impl
-   |           ^
-
-error: expected a trait, found type
-  --> $DIR/impl-parsing.rs:18:6
-   |
-LL | impl ?Sized for Type {} //~ ERROR expected a trait, found type
-   |      ^^^^^^
-
-error: expected a trait, found type
-  --> $DIR/impl-parsing.rs:19:6
-   |
-LL | impl ?Sized for .. {} //~ ERROR expected a trait, found type
-   |      ^^^^^^
-
-error: expected `impl`, found `FAIL`
-  --> $DIR/impl-parsing.rs:21:16
-   |
-LL | default unsafe FAIL //~ ERROR expected `impl`, found `FAIL`
-   |                ^^^^ expected `impl` here
-
-error: aborting due to 5 previous errors
-
diff --git a/src/test/ui/token/bounds-obj-parens.rs b/src/test/ui/token/bounds-obj-parens.rs
deleted file mode 100644 (file)
index 9617df8..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
-type A = Box<(Fn(D::Error) -> E) + 'static + Send + Sync>; // OK (but see #39318)
-
-FAIL
-//~^ ERROR
diff --git a/src/test/ui/token/bounds-obj-parens.stderr b/src/test/ui/token/bounds-obj-parens.stderr
deleted file mode 100644 (file)
index 67dcbc4..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-error: expected one of `!` or `::`, found `<eof>`
-  --> $DIR/bounds-obj-parens.rs:15:1
-   |
-LL | FAIL
-   | ^^^^ expected one of `!` or `::` here
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/token/issue-10636-2.rs b/src/test/ui/token/issue-10636-2.rs
deleted file mode 100644 (file)
index 7118037..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2013-2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// FIXME(31528) we emit a bunch of silly errors here due to continuing past the
-// first one. This would be easy-ish to address by better recovery in tokenisation.
-
-pub fn trace_option(option: Option<isize>) {
-    option.map(|some| 42;
-                          //~^ ERROR: expected one of
-
-} //~ ERROR: incorrect close delimiter
-//~^ ERROR: expected expression, found `)`
-
-fn main() {}
diff --git a/src/test/ui/token/issue-10636-2.stderr b/src/test/ui/token/issue-10636-2.stderr
deleted file mode 100644 (file)
index 9800b0c..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-error: incorrect close delimiter: `}`
-  --> $DIR/issue-10636-2.rs:18:1
-   |
-LL | pub fn trace_option(option: Option<isize>) {
-   |                                            - close delimiter possibly meant for this
-LL |     option.map(|some| 42;
-   |               - un-closed delimiter
-...
-LL | } //~ ERROR: incorrect close delimiter
-   | ^ incorrect close delimiter
-
-error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;`
-  --> $DIR/issue-10636-2.rs:15:25
-   |
-LL |     option.map(|some| 42;
-   |                         ^ expected one of `)`, `,`, `.`, `?`, or an operator here
-
-error: expected expression, found `)`
-  --> $DIR/issue-10636-2.rs:18:1
-   |
-LL | } //~ ERROR: incorrect close delimiter
-   | ^ expected expression
-
-error: aborting due to 3 previous errors
-
diff --git a/src/test/ui/token/issue-15980.rs b/src/test/ui/token/issue-15980.rs
deleted file mode 100644 (file)
index e1b134c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::io;
-
-fn main(){
-    let x: io::IoResult<()> = Ok(());
-    //~^ ERROR cannot find type `IoResult` in module `io`
-    //~| NOTE did you mean `Result`?
-    match x {
-        Err(ref e) if e.kind == io::EndOfFile {
-            //~^ NOTE while parsing this struct
-            return
-            //~^ ERROR expected identifier, found keyword `return`
-            //~| NOTE expected identifier, found keyword
-        }
-        //~^ NOTE expected one of `.`, `=>`, `?`, or an operator here
-        _ => {}
-        //~^ ERROR expected one of `.`, `=>`, `?`, or an operator, found `_`
-        //~| NOTE unexpected token
-    }
-}
diff --git a/src/test/ui/token/issue-15980.stderr b/src/test/ui/token/issue-15980.stderr
deleted file mode 100644 (file)
index d52368b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-error: expected identifier, found keyword `return`
-  --> $DIR/issue-15980.rs:20:13
-   |
-LL |         Err(ref e) if e.kind == io::EndOfFile {
-   |                                 ------------- while parsing this struct
-LL |             //~^ NOTE while parsing this struct
-LL |             return
-   |             ^^^^^^ expected identifier, found keyword
-
-error: expected one of `.`, `=>`, `?`, or an operator, found `_`
-  --> $DIR/issue-15980.rs:25:9
-   |
-LL |         }
-   |          - expected one of `.`, `=>`, `?`, or an operator here
-LL |         //~^ NOTE expected one of `.`, `=>`, `?`, or an operator here
-LL |         _ => {}
-   |         ^ unexpected token
-
-error[E0412]: cannot find type `IoResult` in module `io`
-  --> $DIR/issue-15980.rs:14:16
-   |
-LL |     let x: io::IoResult<()> = Ok(());
-   |                ^^^^^^^^ did you mean `Result`?
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/token/issue-41155.rs b/src/test/ui/token/issue-41155.rs
deleted file mode 100644 (file)
index 7bd8506..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-impl S { //~ ERROR cannot find type
-    pub
-} //~ ERROR expected one of
-
-fn main() {}
diff --git a/src/test/ui/token/issue-41155.stderr b/src/test/ui/token/issue-41155.stderr
deleted file mode 100644 (file)
index 5c1aae2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-error: expected one of `(`, `async`, `const`, `default`, `existential`, `extern`, `fn`, `type`, or `unsafe`, found `}`
-  --> $DIR/issue-41155.rs:13:1
-   |
-LL |     pub
-   |        - expected one of 9 possible tokens here
-LL | } //~ ERROR expected one of
-   | ^ unexpected token
-
-error[E0412]: cannot find type `S` in this scope
-  --> $DIR/issue-41155.rs:11:6
-   |
-LL | impl S { //~ ERROR cannot find type
-   |      ^ not found in this scope
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/token/macro-incomplete-parse.rs b/src/test/ui/token/macro-incomplete-parse.rs
deleted file mode 100644 (file)
index 9b8fdaf..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z continue-parse-after-error
-
-macro_rules! ignored_item {
-    () => {
-        fn foo() {}
-        fn bar() {}
-        , //~ ERROR macro expansion ignores token `,`
-    }
-}
-
-macro_rules! ignored_expr {
-    () => ( 1,  //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
-
-            2 )
-}
-
-macro_rules! ignored_pat {
-    () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,`
-}
-
-ignored_item!();
-
-fn main() {
-    ignored_expr!();
-    match 1 {
-        ignored_pat!() => (),
-        _ => (),
-    }
-}
diff --git a/src/test/ui/token/macro-incomplete-parse.stderr b/src/test/ui/token/macro-incomplete-parse.stderr
deleted file mode 100644 (file)
index 198730d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-error: macro expansion ignores token `,` and any following
-  --> $DIR/macro-incomplete-parse.rs:17:9
-   |
-LL |         , //~ ERROR macro expansion ignores token `,`
-   |         ^
-   |
-note: caused by the macro expansion here; the usage of `ignored_item!` is likely invalid in item context
-  --> $DIR/macro-incomplete-parse.rs:31:1
-   |
-LL | ignored_item!();
-   | ^^^^^^^^^^^^^^^^
-
-error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
-  --> $DIR/macro-incomplete-parse.rs:22:14
-   |
-LL |     () => ( 1,  //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
-   |              ^ expected one of `.`, `;`, `?`, `}`, or an operator here
-...
-LL |     ignored_expr!();
-   |     ---------------- in this macro invocation
-
-error: macro expansion ignores token `,` and any following
-  --> $DIR/macro-incomplete-parse.rs:28:14
-   |
-LL |     () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,`
-   |              ^
-   |
-note: caused by the macro expansion here; the usage of `ignored_pat!` is likely invalid in pattern context
-  --> $DIR/macro-incomplete-parse.rs:36:9
-   |
-LL |         ignored_pat!() => (),
-   |         ^^^^^^^^^^^^^^
-
-error: aborting due to 3 previous errors
-
diff --git a/src/test/ui/token/trailing-plus-in-bounds.rs b/src/test/ui/token/trailing-plus-in-bounds.rs
deleted file mode 100644 (file)
index 72cae6a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only -Z continue-parse-after-error
-
-use std::fmt::Debug;
-
-fn main() {
-    let x: Box<Debug+> = box 3 as Box<Debug+>; // Trailing `+` is OK
-}
-
-FAIL
-//~^ ERROR
diff --git a/src/test/ui/token/trailing-plus-in-bounds.stderr b/src/test/ui/token/trailing-plus-in-bounds.stderr
deleted file mode 100644 (file)
index 1719b1d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-error: expected one of `!` or `::`, found `<eof>`
-  --> $DIR/trailing-plus-in-bounds.rs:19:1
-   |
-LL | FAIL
-   | ^^^^ expected one of `!` or `::` here
-
-error: aborting due to previous error
-