about summary refs log tree commit diff
path: root/src/test/ui/try-block
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2020-09-07 10:01:45 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2020-10-06 11:19:33 +0100
commit022c148fcd9e4339b4b59dfaee58ca5905d71b2d (patch)
tree78e9598de2e80351e8f50abf57ca9f6c0b74e8c6 /src/test/ui/try-block
parent1db284ecb0039798a09e53a519219c5c556c9b38 (diff)
downloadrust-022c148fcd9e4339b4b59dfaee58ca5905d71b2d.tar.gz
rust-022c148fcd9e4339b4b59dfaee58ca5905d71b2d.zip
Fix tests from rebase
Diffstat (limited to 'src/test/ui/try-block')
-rw-r--r--src/test/ui/try-block/try-block-bad-type.rs4
-rw-r--r--src/test/ui/try-block/try-block-bad-type.stderr14
-rw-r--r--src/test/ui/try-block/try-block-in-while.stderr4
3 files changed, 15 insertions, 7 deletions
diff --git a/src/test/ui/try-block/try-block-bad-type.rs b/src/test/ui/try-block/try-block-bad-type.rs
index c338294913f..496ba145810 100644
--- a/src/test/ui/try-block/try-block-bad-type.rs
+++ b/src/test/ui/try-block/try-block-bad-type.rs
@@ -14,7 +14,9 @@ pub fn main() {
 
     let res: Result<i32, i32> = try { }; //~ ERROR type mismatch
 
-    let res: () = try { }; //~ the trait bound `(): Try` is not satisfied
+    let res: () = try { };
+    //~^ ERROR the trait bound `(): Try` is not satisfied
+    //~| ERROR the trait bound `(): Try` is not satisfied
 
     let res: i32 = try { 5 }; //~ ERROR the trait bound `i32: Try` is not satisfied
 }
diff --git a/src/test/ui/try-block/try-block-bad-type.stderr b/src/test/ui/try-block/try-block-bad-type.stderr
index dfc1c342a50..cadf3a841c9 100644
--- a/src/test/ui/try-block/try-block-bad-type.stderr
+++ b/src/test/ui/try-block/try-block-bad-type.stderr
@@ -26,18 +26,24 @@ LL |     let res: Result<i32, i32> = try { };
    |                                       ^ expected `i32`, found `()`
 
 error[E0277]: the trait bound `(): Try` is not satisfied
-  --> $DIR/try-block-bad-type.rs:17:23
+  --> $DIR/try-block-bad-type.rs:17:25
    |
 LL |     let res: () = try { };
-   |                       ^^^ the trait `Try` is not implemented for `()`
+   |                         ^ the trait `Try` is not implemented for `()`
    |
    = note: required by `from_ok`
 
+error[E0277]: the trait bound `(): Try` is not satisfied
+  --> $DIR/try-block-bad-type.rs:17:25
+   |
+LL |     let res: () = try { };
+   |                         ^ the trait `Try` is not implemented for `()`
+
 error[E0277]: the trait bound `i32: Try` is not satisfied
-  --> $DIR/try-block-bad-type.rs:19:24
+  --> $DIR/try-block-bad-type.rs:21:26
    |
 LL |     let res: i32 = try { 5 };
-   |                        ^^^^^ the trait `Try` is not implemented for `i32`
+   |                          ^ the trait `Try` is not implemented for `i32`
    |
    = note: required by `from_ok`
 
diff --git a/src/test/ui/try-block/try-block-in-while.stderr b/src/test/ui/try-block/try-block-in-while.stderr
index bc0f5bb6505..75a4e8d065c 100644
--- a/src/test/ui/try-block/try-block-in-while.stderr
+++ b/src/test/ui/try-block/try-block-in-while.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `bool: Try` is not satisfied
-  --> $DIR/try-block-in-while.rs:6:15
+  --> $DIR/try-block-in-while.rs:6:17
    |
 LL |     while try { false } {}
-   |               ^^^^^^^^^ the trait `Try` is not implemented for `bool`
+   |                 ^^^^^ the trait `Try` is not implemented for `bool`
    |
    = note: required by `from_ok`