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 {
|
2022-06-09 22:14:24 -05:00
|
|
|
fn unused_impl_fn_1() { //~ ERROR associated function `unused_impl_fn_1` is never used
|
2020-05-06 03:01:20 -05:00
|
|
|
println!("blah");
|
|
|
|
}
|
|
|
|
|
2022-06-09 22:14:24 -05:00
|
|
|
fn unused_impl_fn_2(var: i32) { //~ ERROR associated function `unused_impl_fn_2` is never used
|
2020-05-06 03:01:20 -05:00
|
|
|
println!("foo {}", var);
|
|
|
|
}
|
|
|
|
|
2022-06-09 22:14:24 -05:00
|
|
|
fn unused_impl_fn_3( //~ ERROR associated function `unused_impl_fn_3` is never used
|
2020-05-06 03:01:20 -05:00
|
|
|
var: i32,
|
|
|
|
) {
|
|
|
|
println!("bar {}", var);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|