]> git.lizzy.rs Git - rust.git/blob - src/test/ui/structs-enums/struct-literal-dtor.rs
Override rustc version in ui and mir-opt tests to get stable hashes
[rust.git] / src / test / ui / structs-enums / struct-literal-dtor.rs
1 // run-pass
2 #![allow(non_camel_case_types)]
3
4 struct foo {
5     x: String,
6 }
7
8 impl Drop for foo {
9     fn drop(&mut self) {
10         println!("{}", self.x);
11     }
12 }
13
14 pub fn main() {
15     let _z = foo {
16         x: "Hello".to_string()
17     };
18 }