1 #![feature(box_syntax)]
2 #![warn(clippy::no_effect)]
4 #![allow(path_statements)]
5 #![allow(clippy::deref_addrof)]
6 #![allow(clippy::redundant_field_names)]
7 #![feature(untagged_unions)]
16 Struct { field: i32 },
19 impl Drop for DropUnit {
25 impl Drop for DropStruct {
28 struct DropTuple(i32);
29 impl Drop for DropTuple {
34 Struct { field: i32 },
36 impl Drop for DropEnum {
47 fn get_number() -> i32 {
50 fn get_struct() -> Struct {
53 fn get_drop_struct() -> DropStruct {
54 DropStruct { field: 0 }
57 unsafe fn unsafe_fn() -> i32 {
63 let s2 = get_struct();
73 Enum::Struct { field: 0 };
91 let s: String = "foo".into();
96 unsafe { unsafe_fn() };
98 DropStruct { field: 0 };
101 DropEnum::Struct { field: 0 };