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 19:25:28 -0800
committerEsteban Küber <esteban@kuber.com.ar>2019-01-19 19:39:58 -0800
commitd37a6d83e1626db51041b6337328cde603f1bc19 (patch)
tree996a811d9bf21e21bac0f984aec5d5bfef411278 /src/test
parent3235446b397a06596063f237ae864de8d95799e9 (diff)
Suggest usage of angle brackets
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/error-codes/E0214.stderr5
-rw-r--r--src/test/ui/issues/issue-23589.stderr5
-rw-r--r--src/test/ui/issues/issue-32995.stderr8
-rw-r--r--src/test/ui/parser/type-parameters-in-field-exprs.stderr12
-rw-r--r--src/test/ui/span/macro-ty-params.stderr8
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr5
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr7
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr5
8 files changed, 35 insertions, 20 deletions
diff --git a/src/test/ui/error-codes/E0214.stderr b/src/test/ui/error-codes/E0214.stderr
index 08a98b1c3bf..0172dc706ac 100644
--- a/src/test/ui/error-codes/E0214.stderr
+++ b/src/test/ui/error-codes/E0214.stderr
@@ -2,7 +2,10 @@ error[E0214]: parenthesized parameters may only be used with a trait
   --> $DIR/E0214.rs:2:15
    |
 LL |     let v: Vec(&str) = vec!["foo"];
-   |               ^^^^^^ only traits may use parentheses
+   |               ^^^^^^
+   |               |
+   |               only traits may use parentheses
+   |               help: use angle brackets instead: `<&str>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-23589.stderr b/src/test/ui/issues/issue-23589.stderr
index c71061606df..932e8eedad1 100644
--- a/src/test/ui/issues/issue-23589.stderr
+++ b/src/test/ui/issues/issue-23589.stderr
@@ -2,7 +2,10 @@ error[E0214]: parenthesized parameters may only be used with a trait
   --> $DIR/issue-23589.rs:2:15
    |
 LL |     let v: Vec(&str) = vec!['1', '2'];
-   |               ^^^^^^ only traits may use parentheses
+   |               ^^^^^^
+   |               |
+   |               only traits may use parentheses
+   |               help: use angle brackets instead: `<&str>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-23589.rs:2:29
diff --git a/src/test/ui/issues/issue-32995.stderr b/src/test/ui/issues/issue-32995.stderr
index 12551bb7f1f..e27f2d9553a 100644
--- a/src/test/ui/issues/issue-32995.stderr
+++ b/src/test/ui/issues/issue-32995.stderr
@@ -18,19 +18,19 @@ LL |     let b: ::std::boxed()::Box<_> = Box::new(1);
    = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
 
 error: parenthesized parameters may only be used with a trait
-  --> $DIR/issue-32995.rs:12:23
+  --> $DIR/issue-32995.rs:12:25
    |
 LL |     let p = ::std::str::()::from_utf8(b"foo").unwrap();
-   |                       ^^^^
+   |                         ^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
 
 error: parenthesized parameters may only be used with a trait
-  --> $DIR/issue-32995.rs:16:34
+  --> $DIR/issue-32995.rs:16:36
    |
 LL |     let p = ::std::str::from_utf8::()(b"foo").unwrap();
-   |                                  ^^^^
+   |                                    ^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #42238 <https://github.com/rust-lang/rust/issues/42238>
diff --git a/src/test/ui/parser/type-parameters-in-field-exprs.stderr b/src/test/ui/parser/type-parameters-in-field-exprs.stderr
index e68e1f3204a..2183c74da0a 100644
--- a/src/test/ui/parser/type-parameters-in-field-exprs.stderr
+++ b/src/test/ui/parser/type-parameters-in-field-exprs.stderr
@@ -1,20 +1,20 @@
 error: field expressions may not have generic arguments
-  --> $DIR/type-parameters-in-field-exprs.rs:13:8
+  --> $DIR/type-parameters-in-field-exprs.rs:13:10
    |
 LL |     f.x::<isize>;
-   |        ^^^^^^^^^
+   |          ^^^^^^^
 
 error: field expressions may not have generic arguments
-  --> $DIR/type-parameters-in-field-exprs.rs:15:8
+  --> $DIR/type-parameters-in-field-exprs.rs:15:10
    |
 LL |     f.x::<>;
-   |        ^^^^
+   |          ^^
 
 error: field expressions may not have generic arguments
-  --> $DIR/type-parameters-in-field-exprs.rs:17:8
+  --> $DIR/type-parameters-in-field-exprs.rs:17:10
    |
 LL |     f.x::();
-   |        ^^^^
+   |          ^^
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/span/macro-ty-params.stderr b/src/test/ui/span/macro-ty-params.stderr
index 23fdde06e8f..965ca7000be 100644
--- a/src/test/ui/span/macro-ty-params.stderr
+++ b/src/test/ui/span/macro-ty-params.stderr
@@ -1,14 +1,14 @@
 error: generic arguments in macro path
-  --> $DIR/macro-ty-params.rs:10:8
+  --> $DIR/macro-ty-params.rs:10:10
    |
 LL |     foo::<T>!(); //~ ERROR generic arguments in macro path
-   |        ^^^^^
+   |          ^^^
 
 error: generic arguments in macro path
-  --> $DIR/macro-ty-params.rs:11:8
+  --> $DIR/macro-ty-params.rs:11:10
    |
 LL |     foo::<>!(); //~ ERROR generic arguments in macro path
-   |        ^^^^
+   |          ^^
 
 error: unexpected generic arguments in path
   --> $DIR/macro-ty-params.rs:12:8
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 ab2a6f03cf7..87832d839b9 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
@@ -2,7 +2,10 @@ error[E0214]: parenthesized parameters may only be used with a trait
   --> $DIR/unboxed-closure-sugar-used-on-struct-1.rs:8:19
    |
 LL |     let x: Box<Bar()> = panic!();
-   |                   ^^ only traits may use parentheses
+   |                   ^^
+   |                   |
+   |                   only traits may use parentheses
+   |                   help: use angle brackets instead: `<>`
 
 error[E0107]: wrong number of type arguments: expected 1, found 0
   --> $DIR/unboxed-closure-sugar-used-on-struct-1.rs:8:16
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..c9cc60717a6 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
@@ -1,8 +1,11 @@
 error[E0214]: parenthesized parameters may only be used with a trait
-  --> $DIR/unboxed-closure-sugar-used-on-struct-3.rs:14:16
+  --> $DIR/unboxed-closure-sugar-used-on-struct-3.rs:14:18
    |
 LL |     let b = Bar::(isize, usize)::new(); // OK too (for the parser)
-   |                ^^^^^^^^^^^^^^^^ only traits may use parentheses
+   |                  ^^^^^^^^^^^^^^
+   |                  |
+   |                  only traits may use parentheses
+   |                  help: use angle brackets instead: `<isize, usize>`
 
 error: aborting due to previous error
 
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 7bcf86774c7..a09c2b75386 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
@@ -2,7 +2,10 @@ error[E0214]: parenthesized parameters may only be used with a trait
   --> $DIR/unboxed-closure-sugar-used-on-struct.rs:7:18
    |
 LL | fn foo(b: Box<Bar()>) {
-   |                  ^^ only traits may use parentheses
+   |                  ^^
+   |                  |
+   |                  only traits may use parentheses
+   |                  help: use angle brackets instead: `<>`
 
 error[E0107]: wrong number of type arguments: expected 1, found 0
   --> $DIR/unboxed-closure-sugar-used-on-struct.rs:7:15