2023-04-20 09:37:15 -05:00
|
|
|
//@run-rustfix
|
2022-05-19 08:03:38 -05:00
|
|
|
#![warn(clippy::unit_arg)]
|
2022-10-02 14:13:22 -05:00
|
|
|
#![allow(unused_must_use, unused_variables)]
|
|
|
|
#![allow(clippy::no_effect, clippy::uninlined_format_args)]
|
2022-05-19 08:03:38 -05:00
|
|
|
|
|
|
|
use std::fmt::Debug;
|
|
|
|
|
|
|
|
fn foo<T: Debug>(t: T) {
|
|
|
|
println!("{:?}", t);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo3<T1: Debug, T2: Debug, T3: Debug>(t1: T1, t2: T2, t3: T3) {
|
|
|
|
println!("{:?}, {:?}, {:?}", t1, t2, t3);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bad() {
|
|
|
|
foo(());
|
|
|
|
foo3((), 2, 2);
|
|
|
|
foo(0);
|
|
|
|
taking_two_units((), ());
|
|
|
|
foo(0);
|
|
|
|
foo(1);
|
|
|
|
taking_three_units((), (), ());
|
|
|
|
}
|
|
|
|
|
|
|
|
fn taking_two_units(a: (), b: ()) {}
|
|
|
|
fn taking_three_units(a: (), b: (), c: ()) {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
bad();
|
|
|
|
}
|