]> git.lizzy.rs Git - rust.git/blob - src/test/ui/structs-enums/newtype-struct-with-dtor.rs
Rollup merge of #106043 - c410-f3r:moar-errors, r=petrochenkov
[rust.git] / src / test / ui / structs-enums / newtype-struct-with-dtor.rs
1 // run-pass
2 #![allow(unused_unsafe)]
3 #![allow(unused_variables)]
4 // pretty-expanded FIXME #23616
5
6 pub struct Fd(u32);
7
8 fn foo(a: u32) {}
9
10 impl Drop for Fd {
11     fn drop(&mut self) {
12         unsafe {
13             let Fd(s) = *self;
14             foo(s);
15         }
16     }
17 }
18
19 pub fn main() {
20 }