From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/reachable/expr_assign.stderr | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/ui/reachable/expr_assign.stderr (limited to 'tests/ui/reachable/expr_assign.stderr') diff --git a/tests/ui/reachable/expr_assign.stderr b/tests/ui/reachable/expr_assign.stderr new file mode 100644 index 000000000..c51156b3f --- /dev/null +++ b/tests/ui/reachable/expr_assign.stderr @@ -0,0 +1,33 @@ +error: unreachable expression + --> $DIR/expr_assign.rs:10:5 + | +LL | x = return; + | ^^^^------ + | | | + | | any code following this expression is unreachable + | unreachable expression + | +note: the lint level is defined here + --> $DIR/expr_assign.rs:5:9 + | +LL | #![deny(unreachable_code)] + | ^^^^^^^^^^^^^^^^ + +error: unreachable expression + --> $DIR/expr_assign.rs:20:14 + | +LL | *p = return; + | -- ^^^^^^ unreachable expression + | | + | any code following this expression is unreachable + +error: unreachable expression + --> $DIR/expr_assign.rs:26:15 + | +LL | *{return; &mut i} = 22; + | ------ ^^^^^^ unreachable expression + | | + | any code following this expression is unreachable + +error: aborting due to 3 previous errors + -- cgit v1.2.3