3 // === GDB TESTS ===================================================================================
6 // gdb-command:print test
7 // gdbr-check:$1 = captured_fields_1::main::{closure#0} {_ref__my_ref__my_field1: 0x[...]}
8 // gdb-command:continue
9 // gdb-command:print test
10 // gdbr-check:$2 = captured_fields_1::main::{closure#1} {_ref__my_ref__my_field2: 0x[...]}
11 // gdb-command:continue
12 // gdb-command:print test
13 // gdbr-check:$3 = captured_fields_1::main::{closure#2} {_ref__my_ref: 0x[...]}
14 // gdb-command:continue
15 // gdb-command:print test
16 // gdbr-check:$4 = captured_fields_1::main::{closure#3} {my_ref: 0x[...]}
17 // gdb-command:continue
18 // gdb-command:print test
19 // gdbr-check:$5 = captured_fields_1::main::{closure#4} {my_var__my_field2: 22}
20 // gdb-command:continue
21 // gdb-command:print test
22 // gdbr-check:$6 = captured_fields_1::main::{closure#5} {my_var: captured_fields_1::MyStruct {my_field1: 11, my_field2: 22}}
23 // gdb-command:continue
25 // === LLDB TESTS ==================================================================================
28 // lldb-command:print test
29 // lldbg-check:(captured_fields_1::main::{closure#0}) $0 = { _ref__my_ref__my_field1 = 0x[...] }
30 // lldb-command:continue
31 // lldb-command:print test
32 // lldbg-check:(captured_fields_1::main::{closure#1}) $1 = { _ref__my_ref__my_field2 = 0x[...] }
33 // lldb-command:continue
34 // lldb-command:print test
35 // lldbg-check:(captured_fields_1::main::{closure#2}) $2 = { _ref__my_ref = 0x[...] }
36 // lldb-command:continue
37 // lldb-command:print test
38 // lldbg-check:(captured_fields_1::main::{closure#3}) $3 = { my_ref = 0x[...] }
39 // lldb-command:continue
40 // lldb-command:print test
41 // lldbg-check:(captured_fields_1::main::{closure#4}) $4 = { my_var__my_field2 = 22 }
42 // lldb-command:continue
43 // lldb-command:print test
44 // lldbg-check:(captured_fields_1::main::{closure#5}) $5 = { my_var = { my_field1 = 11 my_field2 = 22 } }
45 // lldb-command:continue
47 #![feature(capture_disjoint_fields)]
56 let mut my_var = MyStruct {
60 let my_ref = &mut my_var;
63 let a = &mut my_ref.my_field1;
69 let a = &my_ref.my_field2;
87 let a = my_var.my_field2;