diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:19 +0000 |
commit | a0b8f38ab54ac451646aa00cd5e91b6c76f22a84 (patch) | |
tree | fc451898ccaf445814e26b46664d78702178101d /tests/ui/reachable | |
parent | Adding debian version 1.71.1+dfsg1-2. (diff) | |
download | rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.tar.xz rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/reachable')
-rw-r--r-- | tests/ui/reachable/expr_return.rs | 2 | ||||
-rw-r--r-- | tests/ui/reachable/expr_return.stderr | 12 | ||||
-rw-r--r-- | tests/ui/reachable/unreachable-variant.stderr | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/ui/reachable/expr_return.rs b/tests/ui/reachable/expr_return.rs index 0fc43f450..0dbeb660e 100644 --- a/tests/ui/reachable/expr_return.rs +++ b/tests/ui/reachable/expr_return.rs @@ -7,7 +7,7 @@ fn a() { // Here we issue that the "2nd-innermost" return is unreachable, // but we stop there. - let x = {return {return {return;}}}; //~ ERROR unreachable + let x: () = {return {return {return;}}}; //~ ERROR unreachable } fn main() { } diff --git a/tests/ui/reachable/expr_return.stderr b/tests/ui/reachable/expr_return.stderr index e1bef80ae..3791559f4 100644 --- a/tests/ui/reachable/expr_return.stderr +++ b/tests/ui/reachable/expr_return.stderr @@ -1,11 +1,11 @@ error: unreachable expression - --> $DIR/expr_return.rs:10:22 + --> $DIR/expr_return.rs:10:26 | -LL | let x = {return {return {return;}}}; - | ^^^^^^^^------^^ - | | | - | | any code following this expression is unreachable - | unreachable expression +LL | let x: () = {return {return {return;}}}; + | ^^^^^^^^------^^ + | | | + | | any code following this expression is unreachable + | unreachable expression | note: the lint level is defined here --> $DIR/expr_return.rs:4:9 diff --git a/tests/ui/reachable/unreachable-variant.stderr b/tests/ui/reachable/unreachable-variant.stderr index 6c27a2756..ca1d2be65 100644 --- a/tests/ui/reachable/unreachable-variant.stderr +++ b/tests/ui/reachable/unreachable-variant.stderr @@ -2,7 +2,7 @@ error[E0603]: module `super_sekrit` is private --> $DIR/unreachable-variant.rs:6:21 | LL | let _x = other::super_sekrit::sooper_sekrit::baz; - | ^^^^^^^^^^^^ private module + | ^^^^^^^^^^^^ private module --- unit variant `baz` is not publicly re-exported | note: the module `super_sekrit` is defined here --> $DIR/auxiliary/unreachable_variant.rs:1:1 |