diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-03-11 21:28:16 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-03-11 21:28:16 +0000 |
| commit | 96d24f2dd13e8e9d0c6f9912781ffe1fc79864d3 (patch) | |
| tree | 3fed8043b4fe7d2fe93416a60bc89fa934fa17aa /tests/ui/liveness | |
| parent | 6554a5645a13e4d9331fd028960d69be91d7492d (diff) | |
| download | rust-96d24f2dd13e8e9d0c6f9912781ffe1fc79864d3.tar.gz rust-96d24f2dd13e8e9d0c6f9912781ffe1fc79864d3.zip | |
Revert "Auto merge of #122140 - oli-obk:track_errors13, r=davidtwco"
This reverts commit 65cd843ae06ad00123c131a431ed5304e4cd577a, reversing changes made to d255c6a57c393db6221b1ff700daea478436f1cd.
Diffstat (limited to 'tests/ui/liveness')
| -rw-r--r-- | tests/ui/liveness/liveness-consts.stderr | 12 | ||||
| -rw-r--r-- | tests/ui/liveness/liveness-forgot-ret.stderr | 22 | ||||
| -rw-r--r-- | tests/ui/liveness/liveness-unused.stderr | 30 |
3 files changed, 32 insertions, 32 deletions
diff --git a/tests/ui/liveness/liveness-consts.stderr b/tests/ui/liveness/liveness-consts.stderr index ceff62de5d2..34ce3947337 100644 --- a/tests/ui/liveness/liveness-consts.stderr +++ b/tests/ui/liveness/liveness-consts.stderr @@ -40,6 +40,12 @@ LL | b += 1; = help: maybe it is overwritten before being read? = note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]` +warning: unused variable: `z` + --> $DIR/liveness-consts.rs:60:13 + | +LL | let z = 42; + | ^ help: if this is intentional, prefix it with an underscore: `_z` + warning: value assigned to `t` is never read --> $DIR/liveness-consts.rs:42:9 | @@ -54,11 +60,5 @@ warning: unused variable: `w` LL | let w = 10; | ^ help: if this is intentional, prefix it with an underscore: `_w` -warning: unused variable: `z` - --> $DIR/liveness-consts.rs:60:13 - | -LL | let z = 42; - | ^ help: if this is intentional, prefix it with an underscore: `_z` - warning: 8 warnings emitted diff --git a/tests/ui/liveness/liveness-forgot-ret.stderr b/tests/ui/liveness/liveness-forgot-ret.stderr index 8f26bbf16d9..f72a30fc4e9 100644 --- a/tests/ui/liveness/liveness-forgot-ret.stderr +++ b/tests/ui/liveness/liveness-forgot-ret.stderr @@ -1,14 +1,3 @@ -warning: function cannot return without recursing - --> $DIR/liveness-forgot-ret.rs:1:1 - | -LL | fn god_exists(a: isize) -> bool { return god_exists(a); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------- recursive call site - | | - | cannot return without recursing - | - = help: a `loop` may express intention better if this is on purpose - = note: `#[warn(unconditional_recursion)]` on by default - error[E0308]: mismatched types --> $DIR/liveness-forgot-ret.rs:4:19 | @@ -22,6 +11,17 @@ help: consider returning the local binding `a` LL | fn f(a: isize) -> isize { if god_exists(a) { return 5; }; a } | + +warning: function cannot return without recursing + --> $DIR/liveness-forgot-ret.rs:1:1 + | +LL | fn god_exists(a: isize) -> bool { return god_exists(a); } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------- recursive call site + | | + | cannot return without recursing + | + = help: a `loop` may express intention better if this is on purpose + = note: `#[warn(unconditional_recursion)]` on by default + error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/liveness/liveness-unused.stderr b/tests/ui/liveness/liveness-unused.stderr index 9f9be8c897b..f6c478ddbc7 100644 --- a/tests/ui/liveness/liveness-unused.stderr +++ b/tests/ui/liveness/liveness-unused.stderr @@ -1,3 +1,18 @@ +warning: unreachable statement + --> $DIR/liveness-unused.rs:92:9 + | +LL | continue; + | -------- any code following this expression is unreachable +LL | drop(*x as i32); + | ^^^^^^^^^^^^^^^^ unreachable statement + | +note: the lint level is defined here + --> $DIR/liveness-unused.rs:1:9 + | +LL | #![warn(unused)] + | ^^^^^^ + = note: `#[warn(unreachable_code)]` implied by `#[warn(unused)]` + error: unused variable: `x` --> $DIR/liveness-unused.rs:8:7 | @@ -75,21 +90,6 @@ error: unused variable: `x` LL | for (x, _) in [1, 2, 3].iter().enumerate() { } | ^ help: if this is intentional, prefix it with an underscore: `_x` -warning: unreachable statement - --> $DIR/liveness-unused.rs:92:9 - | -LL | continue; - | -------- any code following this expression is unreachable -LL | drop(*x as i32); - | ^^^^^^^^^^^^^^^^ unreachable statement - | -note: the lint level is defined here - --> $DIR/liveness-unused.rs:1:9 - | -LL | #![warn(unused)] - | ^^^^^^ - = note: `#[warn(unreachable_code)]` implied by `#[warn(unused)]` - error: unused variable: `x` --> $DIR/liveness-unused.rs:89:13 | |
