1 #![warn(clippy::double_must_use)]
2 #![allow(clippy::result_unit_err)]
3
4 #[must_use]
must_use_result() -> Result<(), ()>5 pub fn must_use_result() -> Result<(), ()> {
6 unimplemented!();
7 }
8
9 #[must_use]
must_use_tuple() -> (Result<(), ()>, u8)10 pub fn must_use_tuple() -> (Result<(), ()>, u8) {
11 unimplemented!();
12 }
13
14 #[must_use]
must_use_array() -> [Result<(), ()>; 1]15 pub fn must_use_array() -> [Result<(), ()>; 1] {
16 unimplemented!();
17 }
18
19 #[must_use = "With note"]
must_use_with_note() -> Result<(), ()>20 pub fn must_use_with_note() -> Result<(), ()> {
21 unimplemented!();
22 }
23
main()24 fn main() {
25 must_use_result();
26 must_use_tuple();
27 must_use_with_note();
28 }
29