From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/let-else/let-else-ref-bindings.stderr | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests/ui/let-else/let-else-ref-bindings.stderr') diff --git a/tests/ui/let-else/let-else-ref-bindings.stderr b/tests/ui/let-else/let-else-ref-bindings.stderr index ada1805e7..0886d7f17 100644 --- a/tests/ui/let-else/let-else-ref-bindings.stderr +++ b/tests/ui/let-else/let-else-ref-bindings.stderr @@ -6,6 +6,10 @@ LL | let Some(ref a): Option<&[u8]> = some else { return }; | = note: expected enum `Option<&[u8]>` found enum `Option>` +help: try using `.as_deref()` to convert `Option>` to `Option<&[u8]>` + | +LL | let Some(ref a): Option<&[u8]> = some.as_deref() else { return }; + | +++++++++++ error[E0308]: mismatched types --> $DIR/let-else-ref-bindings.rs:20:38 @@ -15,6 +19,11 @@ LL | let Some(ref a): Option<&[u8]> = &some else { return }; | = note: expected enum `Option<&[u8]>` found reference `&Option>` +help: try using `.as_deref()` to convert `&Option>` to `Option<&[u8]>` + | +LL - let Some(ref a): Option<&[u8]> = &some else { return }; +LL + let Some(ref a): Option<&[u8]> = some.as_deref() else { return }; + | error[E0308]: mismatched types --> $DIR/let-else-ref-bindings.rs:24:34 @@ -26,6 +35,10 @@ LL | let Some(a): Option<&[u8]> = some else { return }; | = note: expected enum `Option<&[u8]>` found enum `Option>` +help: try using `.as_deref()` to convert `Option>` to `Option<&[u8]>` + | +LL | let Some(a): Option<&[u8]> = some.as_deref() else { return }; + | +++++++++++ error[E0308]: mismatched types --> $DIR/let-else-ref-bindings.rs:27:34 @@ -37,6 +50,11 @@ LL | let Some(a): Option<&[u8]> = &some else { return }; | = note: expected enum `Option<&[u8]>` found reference `&Option>` +help: try using `.as_deref()` to convert `&Option>` to `Option<&[u8]>` + | +LL - let Some(a): Option<&[u8]> = &some else { return }; +LL + let Some(a): Option<&[u8]> = some.as_deref() else { return }; + | error[E0308]: mismatched types --> $DIR/let-else-ref-bindings.rs:44:46 -- cgit v1.2.3