+// run-rustfix
+
#![warn(clippy::let_unit_value)]
+#![allow(clippy::no_effect)]
#![allow(unused_variables)]
macro_rules! let_and_return {
consume_units_with_for_loop(); // should be fine as well
+ multiline_sugg();
+
let_and_return!(()) // should be fine
}
assert_eq!(count, 1);
}
+fn multiline_sugg() {
+ let v: Vec<u8> = vec![2];
+
+ let _ = v
+ .into_iter()
+ .map(|i| i * 2)
+ .filter(|i| i % 2 == 0)
+ .map(|_| ())
+ .next()
+ .unwrap();
+}
+
#[derive(Copy, Clone)]
pub struct ContainsUnit(()); // should be fine