2019-05-23 16:56:31 -05:00
|
|
|
#![deny(unused_must_use)]
|
|
|
|
|
2019-05-28 14:12:48 -05:00
|
|
|
fn foo() -> (Result<(), ()>, ()) {
|
|
|
|
(Ok::<(), ()>(()), ())
|
2019-05-27 14:38:13 -05:00
|
|
|
}
|
|
|
|
|
2019-05-23 16:56:31 -05:00
|
|
|
fn main() {
|
2021-01-28 10:01:36 -06:00
|
|
|
(Ok::<(), ()>(()),); //~ ERROR unused `Result`
|
2019-05-27 10:48:43 -05:00
|
|
|
|
|
|
|
(Ok::<(), ()>(()), 0, Ok::<(), ()>(()), 5);
|
2021-01-28 10:01:36 -06:00
|
|
|
//~^ ERROR unused `Result`
|
|
|
|
//~^^ ERROR unused `Result`
|
2019-05-27 14:38:13 -05:00
|
|
|
|
2021-01-28 10:01:36 -06:00
|
|
|
foo(); //~ ERROR unused `Result`
|
2019-06-03 12:50:32 -05:00
|
|
|
|
2021-01-28 10:01:36 -06:00
|
|
|
((Err::<(), ()>(()), ()), ()); //~ ERROR unused `Result`
|
2019-05-23 16:56:31 -05:00
|
|
|
}
|