1 #![warn(clippy::unit_arg)]
12 fn foo<T: Debug>(t: T) {
16 fn foo3<T1: Debug, T2: Debug, T3: Debug>(t1: T1, t2: T2, t3: T3) {
17 println!("{:?}, {:?}, {:?}", t1, t2, t3);
23 fn bar<T: Debug>(&self, t: T) {
41 taking_multiple_units(foo(0), foo(1));
42 taking_multiple_units(foo(0), {
46 taking_multiple_units(
56 // here Some(foo(2)) isn't the top level statement expression, wrap the suggestion in a block
57 None.or(Some(foo(2)));
58 // in this case, the suggestion can be inlined, no need for a surrounding block
59 // foo(()); foo(()) instead of { foo(()); foo(()) }
67 foo3("a", 3, vec![3]);
74 fn question_mark() -> Result<(), ()> {
82 fn unit_fn() -> Result<(), i32> {
86 fn fallible() -> Result<(), i32> {
92 fn returning_expr() -> Option<()> {
96 fn taking_multiple_units(a: (), b: ()) {}