Skip to content
Permalink
Browse files

Add nested must_use variant

  • Loading branch information...
varkor committed Jun 3, 2019
1 parent 81fa794 commit de2bf3a761db4510c7aae109ada58acbbc450fa7
Showing with 11 additions and 1 deletion.
  1. +2 −0 src/test/ui/lint/must_use-tuple.rs
  2. +9 −1 src/test/ui/lint/must_use-tuple.stderr
@@ -12,4 +12,6 @@ fn main() {
//~^^ ERROR unused `std::result::Result`

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

((Err::<(), ()>(()), ()), ()); //~ ERROR unused `std::result::Result`
}
@@ -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.
You can’t perform that action at this time.