rust/src/test/ui/never-assign-dead-code.stderr
David Wood 5f021e0023
Unused variable suggestions on all patterns.
This commit extends existing suggestions to prefix unused variable
bindings in match arms with an underscore so that it applies to all
patterns in a match arm.
2019-01-28 10:46:31 +01:00

33 lines
839 B
Plaintext

warning: unreachable statement
--> $DIR/never-assign-dead-code.rs:10:5
|
LL | drop(x); //~ WARN unreachable
| ^^^^^^^^
|
note: lint level defined here
--> $DIR/never-assign-dead-code.rs:5:9
|
LL | #![warn(unused)]
| ^^^^^^
= note: #[warn(unreachable_code)] implied by #[warn(unused)]
warning: unreachable expression
--> $DIR/never-assign-dead-code.rs:10:5
|
LL | drop(x); //~ WARN unreachable
| ^^^^^^^
warning: unused variable: `x`
--> $DIR/never-assign-dead-code.rs:9:9
|
LL | let x: ! = panic!("aah"); //~ WARN unused
| ^ help: consider prefixing with an underscore: `_x`
|
note: lint level defined here
--> $DIR/never-assign-dead-code.rs:5:9
|
LL | #![warn(unused)]
| ^^^^^^
= note: #[warn(unused_variables)] implied by #[warn(unused)]