2020-05-06 10:01:20 +02:00
|
|
|
#![deny(dead_code)]
|
|
|
|
|
2022-06-10 12:14:24 +09:00
|
|
|
struct UnusedStruct; //~ ERROR struct `UnusedStruct` is never constructed
|
2020-05-06 10:01:20 +02:00
|
|
|
impl UnusedStruct {
|
2022-06-10 12:14:24 +09:00
|
|
|
fn unused_impl_fn_1() { //~ ERROR associated function `unused_impl_fn_1` is never used
|
2020-05-06 10:01:20 +02:00
|
|
|
println!("blah");
|
|
|
|
}
|
|
|
|
|
2022-06-10 12:14:24 +09:00
|
|
|
fn unused_impl_fn_2(var: i32) { //~ ERROR associated function `unused_impl_fn_2` is never used
|
2020-05-06 10:01:20 +02:00
|
|
|
println!("foo {}", var);
|
|
|
|
}
|
|
|
|
|
2022-06-10 12:14:24 +09:00
|
|
|
fn unused_impl_fn_3( //~ ERROR associated function `unused_impl_fn_3` is never used
|
2020-05-06 10:01:20 +02:00
|
|
|
var: i32,
|
|
|
|
) {
|
|
|
|
println!("bar {}", var);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|