// Test that move closures compile properly with `capture_disjoint_fields` enabled.
+#![allow(unused)]
+
fn simple_ref() {
let mut s = 10;
let ref_s = &mut s;
c();
}
+// Test that move closures can take ownership of Copy type
+fn returned_closure_owns_copy_type_data() -> impl Fn() -> i32 {
+ let x = 10;
+
+ let c = move || x;
+
+ c
+}
+
fn main() {
simple_ref();
struct_contains_ref_to_another_struct();
disjoint_via_ref();
data_moved_but_not_fn_once();
+
+ returned_closure_owns_copy_type_data();
}