]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/dead-code/lint-dead-code-6.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / 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() {}