Add nested must_use variant

This commit is contained in:
varkor 2019-06-03 18:50:32 +01:00
parent 81fa794af9
commit de2bf3a761
2 changed files with 11 additions and 1 deletions

View file

@ -12,4 +12,6 @@ fn main() {
//~^^ ERROR unused `std::result::Result`
foo(); //~ ERROR unused `std::result::Result`
((Err::<(), ()>(()), ()), ()); //~ ERROR unused `std::result::Result`
}

View file

@ -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