Add nested must_use variant
This commit is contained in:
parent
81fa794af9
commit
de2bf3a761
2 changed files with 11 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue