about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-01-19 14:48:43 -0800
committerEsteban Küber <esteban@kuber.com.ar>2019-01-19 18:44:26 -0800
commitd38e70036eee2187d93d8d760461a79aaa84489f (patch)
tree3f2593e819ebdeea74f014bb889125db1bb778e5 /src/test
parent0c0c585281740aba4c91cbfd385f5e1fbe313d11 (diff)
downloadrust-d38e70036eee2187d93d8d760461a79aaa84489f.tar.gz
rust-d38e70036eee2187d93d8d760461a79aaa84489f.zip
Continune parsing after encountering Trait with paren args
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/error-codes/E0214.stderr11
-rw-r--r--src/test/ui/issues/issue-23589.stderr11
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr11
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr11
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr8
5 files changed, 40 insertions, 12 deletions
diff --git a/src/test/ui/error-codes/E0214.stderr b/src/test/ui/error-codes/E0214.stderr
index 08a98b1c3bf..f87502efe1b 100644
--- a/src/test/ui/error-codes/E0214.stderr
+++ b/src/test/ui/error-codes/E0214.stderr
@@ -4,6 +4,13 @@ error[E0214]: parenthesized parameters may only be used with a trait
 LL |     let v: Vec(&str) = vec!["foo"];
    |               ^^^^^^ only traits may use parentheses
 
-error: aborting due to previous error
+error[E0107]: wrong number of type arguments: expected 1, found 0
+  --> $DIR/E0214.rs:2:12
+   |
+LL |     let v: Vec(&str) = vec!["foo"];
+   |            ^^^^^^^^^ expected 1 type argument
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0214`.
+Some errors occurred: E0107, E0214.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/src/test/ui/issues/issue-23589.stderr b/src/test/ui/issues/issue-23589.stderr
index e6e07c167f3..15f2c524a7a 100644
--- a/src/test/ui/issues/issue-23589.stderr
+++ b/src/test/ui/issues/issue-23589.stderr
@@ -4,6 +4,13 @@ error[E0214]: parenthesized parameters may only be used with a trait
 LL |     let v: Vec(&str) = vec!['1', '2'];
    |               ^^^^^^ only traits may use parentheses
 
-error: aborting due to previous error
+error[E0107]: wrong number of type arguments: expected 1, found 0
+  --> $DIR/issue-23589.rs:2:12
+   |
+LL |     let v: Vec(&str) = vec!['1', '2'];
+   |            ^^^^^^^^^ expected 1 type argument
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0214`.
+Some errors occurred: E0107, E0214.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr
index 3f1b37c282b..ab2a6f03cf7 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr
@@ -4,6 +4,13 @@ error[E0214]: parenthesized parameters may only be used with a trait
 LL |     let x: Box<Bar()> = panic!();
    |                   ^^ only traits may use parentheses
 
-error: aborting due to previous error
+error[E0107]: wrong number of type arguments: expected 1, found 0
+  --> $DIR/unboxed-closure-sugar-used-on-struct-1.rs:8:16
+   |
+LL |     let x: Box<Bar()> = panic!();
+   |                ^^^^^ expected 1 type argument
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0214`.
+Some errors occurred: E0107, E0214.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr
index 395f6596cfd..b4f7a97c3e5 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr
@@ -4,6 +4,13 @@ error[E0214]: parenthesized parameters may only be used with a trait
 LL |     let b = Bar::(isize, usize)::new(); // OK too (for the parser)
    |                ^^^^^^^^^^^^^^^^ only traits may use parentheses
 
-error: aborting due to previous error
+error[E0107]: wrong number of type arguments: expected 2, found 0
+  --> $DIR/unboxed-closure-sugar-used-on-struct-3.rs:14:13
+   |
+LL |     let b = Bar::(isize, usize)::new(); // OK too (for the parser)
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 type arguments
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0214`.
+Some errors occurred: E0107, E0214.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr
index d0267092030..7bcf86774c7 100644
--- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr
@@ -4,13 +4,13 @@ error[E0214]: parenthesized parameters may only be used with a trait
 LL | fn foo(b: Box<Bar()>) {
    |                  ^^ only traits may use parentheses
 
-error[E0121]: the type placeholder `_` is not allowed within types on item signatures
+error[E0107]: wrong number of type arguments: expected 1, found 0
   --> $DIR/unboxed-closure-sugar-used-on-struct.rs:7:15
    |
 LL | fn foo(b: Box<Bar()>) {
-   |               ^^^^^ not allowed in type signatures
+   |               ^^^^^ expected 1 type argument
 
 error: aborting due to 2 previous errors
 
-Some errors occurred: E0121, E0214.
-For more information about an error, try `rustc --explain E0121`.
+Some errors occurred: E0107, E0214.
+For more information about an error, try `rustc --explain E0107`.