about summary refs log tree commit diff
path: root/src/test/ui/pattern
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-11-20 10:28:05 +0000
committerbors <bors@rust-lang.org>2021-11-20 10:28:05 +0000
commit3d789740b09002e3d2be3ab1cf53fdca3995034c (patch)
tree760446b1d10e5a8b280fa4e791609da5ac3739d0 /src/test/ui/pattern
parent6d48ee90f51dd5793b425c6593581fd108ead398 (diff)
parent3379721a30d87c396df69efa15b1307389d408df (diff)
downloadrust-3d789740b09002e3d2be3ab1cf53fdca3995034c.tar.gz
rust-3d789740b09002e3d2be3ab1cf53fdca3995034c.zip
Auto merge of #91080 - matthiaskrgr:rollup-znh88cy, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #90575 (Improve suggestions for compatible variants on type mismatch.)
 - #90628 (Clarify error messages caused by re-exporting `pub(crate)` visibility to outside)
 - #90930 (Fix `non-constant value` ICE (#90878))
 - #90983 (Make scrollbar in the sidebar always visible for visual consistency)
 - #91021 (Elaborate `Future::Output` when printing opaque `impl Future` type)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/ui/pattern')
-rw-r--r--src/test/ui/pattern/pat-type-err-let-stmt.stderr10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/test/ui/pattern/pat-type-err-let-stmt.stderr b/src/test/ui/pattern/pat-type-err-let-stmt.stderr
index 4b4fb089283..090bd67117e 100644
--- a/src/test/ui/pattern/pat-type-err-let-stmt.stderr
+++ b/src/test/ui/pattern/pat-type-err-let-stmt.stderr
@@ -2,14 +2,16 @@ error[E0308]: mismatched types
   --> $DIR/pat-type-err-let-stmt.rs:6:29
    |
 LL |     let Ok(0): Option<u8> = 42u8;
-   |                ----------   ^^^^
-   |                |            |
-   |                |            expected enum `Option`, found `u8`
-   |                |            help: try using a variant of the expected enum: `Some(42u8)`
+   |                ----------   ^^^^ expected enum `Option`, found `u8`
+   |                |
    |                expected due to this
    |
    = note: expected enum `Option<u8>`
               found type `u8`
+help: try wrapping the expression in `Some`
+   |
+LL |     let Ok(0): Option<u8> = Some(42u8);
+   |                             +++++    +
 
 error[E0308]: mismatched types
   --> $DIR/pat-type-err-let-stmt.rs:6:9