diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
commit | 2ff14448863ac1a1dd9533461708e29aae170c2d (patch) | |
tree | 85b9fea2bbfe3f06473cfa381eed11f273b57c5c /src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr | |
parent | Adding debian version 1.64.0+dfsg1-1. (diff) | |
download | rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.tar.xz rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.zip |
Adding debian version 1.65.0+dfsg1-2.debian/1.65.0+dfsg1-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr')
-rw-r--r-- | src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr | 48 |
1 files changed, 15 insertions, 33 deletions
diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr index fce0cdfe0..bc06fde49 100644 --- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr +++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr @@ -1493,17 +1493,11 @@ LL | if (let 0 = 0)? {} error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) --> $DIR/disallowed-positions.rs:132:19 | -LL | / fn nested_within_if_expr() { -LL | | if &let 0 = 0 {} -LL | | -LL | | -... | -LL | | if (let 0 = 0)? {} - | | ^ cannot use the `?` operator in a function that returns `()` -... | -LL | | -LL | | } - | |_- this function should return `Result` or `Option` to accept `?` +LL | fn nested_within_if_expr() { + | -------------------------- this function should return `Result` or `Option` to accept `?` +... +LL | if (let 0 = 0)? {} + | ^ cannot use the `?` operator in a function that returns `()` | = help: the trait `FromResidual<_>` is not implemented for `()` @@ -1693,17 +1687,11 @@ LL | while (let 0 = 0)? {} error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) --> $DIR/disallowed-positions.rs:224:22 | -LL | / fn nested_within_while_expr() { -LL | | while &let 0 = 0 {} -LL | | -LL | | -... | -LL | | while (let 0 = 0)? {} - | | ^ cannot use the `?` operator in a function that returns `()` -... | -LL | | -LL | | } - | |_- this function should return `Result` or `Option` to accept `?` +LL | fn nested_within_while_expr() { + | ----------------------------- this function should return `Result` or `Option` to accept `?` +... +LL | while (let 0 = 0)? {} + | ^ cannot use the `?` operator in a function that returns `()` | = help: the trait `FromResidual<_>` is not implemented for `()` @@ -1881,17 +1869,11 @@ LL | (let 0 = 0)?; error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) --> $DIR/disallowed-positions.rs:325:16 | -LL | / fn outside_if_and_while_expr() { -LL | | &let 0 = 0; -LL | | -LL | | -... | -LL | | (let 0 = 0)?; - | | ^ cannot use the `?` operator in a function that returns `()` -... | -LL | | -LL | | } - | |_- this function should return `Result` or `Option` to accept `?` +LL | fn outside_if_and_while_expr() { + | ------------------------------ this function should return `Result` or `Option` to accept `?` +... +LL | (let 0 = 0)?; + | ^ cannot use the `?` operator in a function that returns `()` | = help: the trait `FromResidual<_>` is not implemented for `()` |