about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-18 17:48:46 +0000
committerbors <bors@rust-lang.org>2022-05-18 17:48:46 +0000
commit07ae142d77f56dd48f2736605e0a6c015f2aecc6 (patch)
tree548d6f2f42fb052207a7c2e0063ddbd608f4ff6e /src/test
parent10d9ecda48f828e174d7a863fc43a155ad086efd (diff)
parent303dcfb9cf24091436df7bb77043b149957722c1 (diff)
downloadrust-07ae142d77f56dd48f2736605e0a6c015f2aecc6.tar.gz
rust-07ae142d77f56dd48f2736605e0a6c015f2aecc6.zip
Auto merge of #96863 - SparrowLii:let, r=michaelwoerister
use `hir::Let` in `hir::Guard::IfLet`

This PR fixes the FIXME about using `hir::Let` in `hir::Guard::IfLet`
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/rfc-2294-if-let-guard/typeck.stderr8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/ui/rfc-2294-if-let-guard/typeck.stderr b/src/test/ui/rfc-2294-if-let-guard/typeck.stderr
index fbb941ffd91..dd1f4826fe0 100644
--- a/src/test/ui/rfc-2294-if-let-guard/typeck.stderr
+++ b/src/test/ui/rfc-2294-if-let-guard/typeck.stderr
@@ -2,7 +2,9 @@ error[E0308]: mismatched types
   --> $DIR/typeck.rs:9:22
    |
 LL |         Ok(x) if let Err(_) = x => {},
-   |                      ^^^^^^ expected enum `Option`, found enum `Result`
+   |                      ^^^^^^   - this expression has type `Option<bool>`
+   |                      |
+   |                      expected enum `Option`, found enum `Result`
    |
    = note: expected enum `Option<bool>`
               found enum `Result<_, _>`
@@ -11,7 +13,9 @@ error[E0308]: mismatched types
   --> $DIR/typeck.rs:11:22
    |
 LL |         Ok(x) if let 0 = x => {},
-   |                      ^ expected enum `Option`, found integer
+   |                      ^   - this expression has type `Option<bool>`
+   |                      |
+   |                      expected enum `Option`, found integer
    |
    = note: expected enum `Option<bool>`
               found type `{integer}`