Skip to content

Commit

Permalink
Remove noisy warnings from unreachable ui test
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 10, 2021
1 parent 10534ac commit 1ab566d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
4 changes: 2 additions & 2 deletions tests/ui/unreachable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub trait Trait {
#[async_trait]
pub trait TraitFoo {
async fn f() {
let y = unimplemented!();
let z = y;
let _y = unimplemented!();
let _z = _y;
}
}

Expand Down
27 changes: 4 additions & 23 deletions tests/ui/unreachable.stderr
Original file line number Diff line number Diff line change
@@ -1,33 +1,14 @@
error: unreachable statement
--> tests/ui/unreachable.rs:16:9
|
15 | let y = unimplemented!();
| ---------------- any code following this expression is unreachable
16 | let z = y;
| ^^^^^^^^^^ unreachable statement
15 | let _y = unimplemented!();
| ---------------- any code following this expression is unreachable
16 | let _z = _y;
| ^^^^^^^^^^^^ unreachable statement
|
note: the lint level is defined here
--> tests/ui/unreachable.rs:1:9
|
1 | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(unreachable_code)]` implied by `#[deny(warnings)]`

error: unused variable: `y`
--> tests/ui/unreachable.rs:15:13
|
15 | let y = unimplemented!();
| ^ help: if this is intentional, prefix it with an underscore: `_y`
|
note: the lint level is defined here
--> tests/ui/unreachable.rs:1:9
|
1 | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(unused_variables)]` implied by `#[deny(warnings)]`

error: unused variable: `z`
--> tests/ui/unreachable.rs:16:13
|
16 | let z = y;
| ^ help: if this is intentional, prefix it with an underscore: `_z`

0 comments on commit 1ab566d

Please sign in to comment.