]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/dead-code/lint-dead-code-6.rs
Auto merge of #101138 - Rejyr:diagnostic-migration-rustc-lint-pt2, r=davidtwco
[rust.git] / tests / ui / lint / dead-code / lint-dead-code-6.rs
1 #![deny(dead_code)]
2
3 struct UnusedStruct; //~ ERROR struct `UnusedStruct` is never constructed
4 impl UnusedStruct {
5     fn unused_impl_fn_1() { //~ ERROR associated function `unused_impl_fn_1` is never used
6         println!("blah");
7     }
8
9     fn unused_impl_fn_2(var: i32) { //~ ERROR associated function `unused_impl_fn_2` is never used
10         println!("foo {}", var);
11     }
12
13     fn unused_impl_fn_3( //~ ERROR associated function `unused_impl_fn_3` is never used
14         var: i32,
15     ) {
16         println!("bar {}", var);
17     }
18 }
19
20 fn main() {}