]> git.lizzy.rs Git - rust.git/blob - tests/ui/double_must_use.rs
iterate List by value
[rust.git] / tests / ui / double_must_use.rs
1 #![warn(clippy::double_must_use)]
2
3 #[must_use]
4 pub fn must_use_result() -> Result<(), ()> {
5     unimplemented!();
6 }
7
8 #[must_use]
9 pub fn must_use_tuple() -> (Result<(), ()>, u8) {
10     unimplemented!();
11 }
12
13 #[must_use]
14 pub fn must_use_array() -> [Result<(), ()>; 1] {
15     unimplemented!();
16 }
17
18 #[must_use = "With note"]
19 pub fn must_use_with_note() -> Result<(), ()> {
20     unimplemented!();
21 }
22
23 fn main() {
24     must_use_result();
25     must_use_tuple();
26     must_use_with_note();
27 }