]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/let_underscore/let_underscore_drop.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / lint / let_underscore / let_underscore_drop.rs
1 // check-pass
2 #![warn(let_underscore_drop)]
3
4 struct NontrivialDrop;
5
6 impl Drop for NontrivialDrop {
7 fn drop(&mut self) {
8 println!("Dropping!");
9 }
10 }
11
12 fn main() {
13 let _ = NontrivialDrop; //~WARNING non-binding let on a type that implements `Drop`
14 }