Skip to content

Commit

Permalink
Add nested must_use variant
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Jun 3, 2019
1 parent 81fa794 commit de2bf3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/test/ui/lint/must_use-tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ fn main() {
//~^^ ERROR unused `std::result::Result`

foo(); //~ ERROR unused `std::result::Result`

((Err::<(), ()>(()), ()), ()); //~ ERROR unused `std::result::Result`
}
10 changes: 9 additions & 1 deletion src/test/ui/lint/must_use-tuple.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,13 @@ LL | foo();
|
= note: this `Result` may be an `Err` variant, which should be handled

error: aborting due to 4 previous errors
error: unused `std::result::Result` in tuple element 0 that must be used
--> $DIR/must_use-tuple.rs:16:6
|
LL | ((Err::<(), ()>(()), ()), ());
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this `Result` may be an `Err` variant, which should be handled

error: aborting due to 5 previous errors

0 comments on commit de2bf3a

Please sign in to comment.