2020-05-06 08:01:20 +00:00
|
|
|
#![deny(dead_code)]
|
|
|
|
|
2022-06-10 03:14:24 +00:00
|
|
|
struct UnusedStruct; //~ ERROR struct `UnusedStruct` is never constructed
|
2020-05-06 08:01:20 +00:00
|
|
|
impl UnusedStruct {
|
2023-04-13 10:42:47 +00: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 08:01:20 +00:00
|
|
|
println!("blah");
|
|
|
|
}
|
|
|
|
|
2023-04-13 10:42:47 +00:00
|
|
|
fn unused_impl_fn_2(var: i32) {
|
2020-05-06 08:01:20 +00:00
|
|
|
println!("foo {}", var);
|
|
|
|
}
|
|
|
|
|
2023-04-13 10:42:47 +00:00
|
|
|
fn unused_impl_fn_3(var: i32) {
|
2020-05-06 08:01:20 +00:00
|
|
|
println!("bar {}", var);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|