diff options
| author | Michael Goulet <michael@errs.io> | 2024-10-16 13:44:56 -0400 | 
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-16 13:44:56 -0400 | 
| commit | 99d5f3b2803daa32909aa841e247ba3ed9efd1b7 (patch) | |
| tree | 21d31ed8dfb5dde2f071a9671b488e055d527fda /tests/ui/try-block | |
| parent | e7c0d2750726c1f08b1de6956248ec78c4a97af6 (diff) | |
| download | rust-99d5f3b2803daa32909aa841e247ba3ed9efd1b7.tar.gz rust-99d5f3b2803daa32909aa841e247ba3ed9efd1b7.zip  | |
Stop inverting expectation in normalization errors
Diffstat (limited to 'tests/ui/try-block')
| -rw-r--r-- | tests/ui/try-block/try-block-bad-type.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/try-block/try-block-type-error.stderr | 9 | 
2 files changed, 4 insertions, 9 deletions
diff --git a/tests/ui/try-block/try-block-bad-type.stderr b/tests/ui/try-block/try-block-bad-type.stderr index 6c41b42dc64..e9e6255cd2a 100644 --- a/tests/ui/try-block/try-block-bad-type.stderr +++ b/tests/ui/try-block/try-block-bad-type.stderr @@ -15,13 +15,13 @@ error[E0271]: type mismatch resolving `<Result<i32, i32> as Try>::Output == &str --> $DIR/try-block-bad-type.rs:12:9 | LL | "" - | ^^ expected `i32`, found `&str` + | ^^ expected `&str`, found `i32` error[E0271]: type mismatch resolving `<Result<i32, i32> as Try>::Output == ()` --> $DIR/try-block-bad-type.rs:15:39 | LL | let res: Result<i32, i32> = try { }; - | ^ expected `i32`, found `()` + | ^ expected `()`, found `i32` error[E0277]: a `try` block must return `Result` or `Option` (or another type that implements `Try`) --> $DIR/try-block-bad-type.rs:17:25 diff --git a/tests/ui/try-block/try-block-type-error.stderr b/tests/ui/try-block/try-block-type-error.stderr index 2cdb5fdee79..07b1209de9d 100644 --- a/tests/ui/try-block/try-block-type-error.stderr +++ b/tests/ui/try-block/try-block-type-error.stderr @@ -2,18 +2,13 @@ error[E0271]: type mismatch resolving `<Option<f32> as Try>::Output == {integer} --> $DIR/try-block-type-error.rs:10:9 | LL | 42 - | ^^ expected `f32`, found integer - | -help: use a float literal - | -LL | 42.0 - | ++ + | ^^ expected integer, found `f32` error[E0271]: type mismatch resolving `<Option<i32> as Try>::Output == ()` --> $DIR/try-block-type-error.rs:16:5 | LL | }; - | ^ expected `i32`, found `()` + | ^ expected `()`, found `i32` error: aborting due to 2 previous errors  | 
