]> git.proxmox.com Git - rustc.git/blame - 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
CommitLineData
f9f354fc
XL
1#![deny(dead_code)]
2
923072b8 3struct UnusedStruct; //~ ERROR struct `UnusedStruct` is never constructed
f9f354fc 4impl UnusedStruct {
923072b8 5 fn unused_impl_fn_1() { //~ ERROR associated function `unused_impl_fn_1` is never used
f9f354fc
XL
6 println!("blah");
7 }
8
923072b8 9 fn unused_impl_fn_2(var: i32) { //~ ERROR associated function `unused_impl_fn_2` is never used
f9f354fc
XL
10 println!("foo {}", var);
11 }
12
923072b8 13 fn unused_impl_fn_3( //~ ERROR associated function `unused_impl_fn_3` is never used
f9f354fc
XL
14 var: i32,
15 ) {
16 println!("bar {}", var);
17 }
18}
19
20fn main() {}