Bless some tests

This commit is contained in:
Giacomo Stevanato 2021-02-28 21:03:36 +01:00
parent 2f8fa012ca
commit 6214ef8a0f
4 changed files with 16 additions and 16 deletions

View File

@ -12,16 +12,16 @@ LL | #![warn(unused)] // UI tests pass `-A unused` (#43896)
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
warning: unused variable: `mut_unused_var`
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:33:9
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:33:13
|
LL | let mut mut_unused_var = 1;
| ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mut_unused_var`
| ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mut_unused_var`
warning: unused variable: `var`
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:10
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:14
|
LL | let (mut var, unused_var) = (1, 2);
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_var`
| ^^^ help: if this is intentional, prefix it with an underscore: `_var`
warning: unused variable: `unused_var`
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:19
@ -36,10 +36,10 @@ LL | if let SoulHistory { corridors_of_light,
| ^^^^^^^^^^^^^^^^^^ help: try ignoring the field: `corridors_of_light: _`
warning: variable `hours_are_suns` is assigned to, but never used
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:46:26
--> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:46:30
|
LL | mut hours_are_suns,
| ^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^
|
= note: consider using `_hours_are_suns` instead

View File

@ -1,8 +1,8 @@
warning: variable `a` is assigned to, but never used
--> $DIR/liveness-consts.rs:7:9
--> $DIR/liveness-consts.rs:7:13
|
LL | let mut a = 0;
| ^^^^^
| ^
|
note: the lint level is defined here
--> $DIR/liveness-consts.rs:2:9

View File

@ -1,8 +1,8 @@
error: value assigned to `x` is never read
--> $DIR/liveness-dead.rs:9:9
--> $DIR/liveness-dead.rs:9:13
|
LL | let mut x: isize = 3;
| ^^^^^
| ^
|
note: the lint level is defined here
--> $DIR/liveness-dead.rs:2:9
@ -20,10 +20,10 @@ LL | x = 4;
= help: maybe it is overwritten before being read?
error: value passed to `x` is never read
--> $DIR/liveness-dead.rs:20:7
--> $DIR/liveness-dead.rs:20:11
|
LL | fn f4(mut x: i32) {
| ^^^^^
| ^
|
= help: maybe it is overwritten before being read?

View File

@ -44,10 +44,10 @@ LL | let x = 3;
| ^ help: if this is intentional, prefix it with an underscore: `_x`
error: variable `x` is assigned to, but never used
--> $DIR/liveness-unused.rs:30:9
--> $DIR/liveness-unused.rs:30:13
|
LL | let mut x = 3;
| ^^^^^
| ^
|
= note: consider using `_x` instead
@ -65,10 +65,10 @@ LL | #![deny(unused_assignments)]
= help: maybe it is overwritten before being read?
error: variable `z` is assigned to, but never used
--> $DIR/liveness-unused.rs:37:9
--> $DIR/liveness-unused.rs:37:13
|
LL | let mut z = 3;
| ^^^^^
| ^
|
= note: consider using `_z` instead