2020-05-06 03:01:20 -05:00
|
|
|
#![deny(dead_code)]
|
|
|
|
|
2022-06-09 22:14:24 -05:00
|
|
|
struct UnusedStruct; //~ ERROR struct `UnusedStruct` is never constructed
|
2020-05-06 03:01:20 -05:00
|
|
|
impl UnusedStruct {
|
2023-04-13 05:42:47 -05:00
|
|
|
fn unused_impl_fn_1() {
|
|
|
|
//~^ ERROR associated functions `unused_impl_fn_1`, `unused_impl_fn_2`, and `unused_impl_fn_3` are never used [dead_code]
|
2020-05-06 03:01:20 -05:00
|
|
|
println!("blah");
|
|
|
|
}
|
|
|
|
|
2023-04-13 05:42:47 -05:00
|
|
|
fn unused_impl_fn_2(var: i32) {
|
2020-05-06 03:01:20 -05:00
|
|
|
println!("foo {}", var);
|
|
|
|
}
|
|
|
|
|
2023-04-13 05:42:47 -05:00
|
|
|
fn unused_impl_fn_3(var: i32) {
|
2020-05-06 03:01:20 -05:00
|
|
|
println!("bar {}", var);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|