mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
18 lines
369 B
Rust
18 lines
369 B
Rust
#![deny(unused_must_use)]
|
|
|
|
fn foo() -> (Result<(), ()>, ()) {
|
|
(Ok::<(), ()>(()), ())
|
|
}
|
|
|
|
fn main() {
|
|
(Ok::<(), ()>(()),); //~ ERROR unused `Result`
|
|
|
|
(Ok::<(), ()>(()), 0, Ok::<(), ()>(()), 5);
|
|
//~^ ERROR unused `Result`
|
|
//~^^ ERROR unused `Result`
|
|
|
|
foo(); //~ ERROR unused `Result`
|
|
|
|
((Err::<(), ()>(()), ()), ()); //~ ERROR unused `Result`
|
|
}
|