2019-05-23 21:56:31 +00:00
|
|
|
#![deny(unused_must_use)]
|
|
|
|
|
2019-05-27 19:38:13 +00:00
|
|
|
fn foo() -> Result<(), ()> {
|
|
|
|
Ok::<(), ()>(())
|
|
|
|
}
|
|
|
|
|
2019-05-23 21:56:31 +00:00
|
|
|
fn main() {
|
|
|
|
(Ok::<(), ()>(()),); //~ ERROR unused `std::result::Result` that must be used
|
2019-05-27 15:48:43 +00:00
|
|
|
|
|
|
|
(Ok::<(), ()>(()), 0, Ok::<(), ()>(()), 5);
|
|
|
|
//~^ ERROR unused `std::result::Result` that must be used
|
|
|
|
//~^^ ERROR unused `std::result::Result` that must be used
|
2019-05-27 19:38:13 +00:00
|
|
|
|
|
|
|
foo(); //~ ERROR unused `std::result::Result` that must be used
|
2019-05-23 21:56:31 +00:00
|
|
|
}
|