3 #![deny(rust_2021_incompatible_closure_captures)]
4 #![feature(rustc_attrs)]
6 #[rustc_insignificant_dtor]
8 struct InsignificantDropPoint {
13 impl Drop for InsignificantDropPoint {
17 struct GenericStruct<T>(T, T);
19 // No drop reordering is required as the elements of `t` implement insignificant drop
20 fn insignificant_drop_does_not_need_migration() {
21 let t = (InsignificantDropPoint { x: 4, y: 9 }, InsignificantDropPoint { x: 4, y: 9 });
30 // Generic struct whose elements don't have significant drops don't need drop reordering
31 fn generic_struct_with_insignificant_drop_does_not_need_migration() {
33 GenericStruct(InsignificantDropPoint { x: 4, y: 9 }, InsignificantDropPoint { x: 4, y: 9 });
43 insignificant_drop_does_not_need_migration();
44 generic_struct_with_insignificant_drop_does_not_need_migration();