]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/must_use-tuple.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / lint / must_use-tuple.rs
1 #![deny(unused_must_use)]
2
3 fn foo() -> (Result<(), ()>, ()) {
4 (Ok::<(), ()>(()), ())
5 }
6
7 fn main() {
8 (Ok::<(), ()>(()),); //~ ERROR unused `Result`
9
10 (Ok::<(), ()>(()), 0, Ok::<(), ()>(()), 5);
11 //~^ ERROR unused `Result`
12 //~^^ ERROR unused `Result`
13
14 foo(); //~ ERROR unused `Result`
15
16 ((Err::<(), ()>(()), ()), ()); //~ ERROR unused `Result`
17 }