36
36
// gdb-command:print void_droid_gdb->internals
37
37
// gdb-check:$6 = (isize *) 0x0
38
38
39
+ // gdb-command:print nested_non_zero_yep
40
+ // gdb-check:$7 = {RUST$ENCODED$ENUM$1$2$Nope = {10.5, {a = 10, b = 20, c = [...]}}}
41
+
42
+ // gdb-command:print nested_non_zero_nope
43
+ // gdb-check:$8 = {RUST$ENCODED$ENUM$1$2$Nope = {[...], {a = [...], b = [...], c = 0x0}}}
44
+
39
45
// gdb-command:continue
40
46
41
47
67
73
// lldb-command:print none_str
68
74
// lldb-check:[...]$7 = None
69
75
76
+ // lldb-command:print nested_non_zero_yep
77
+ // lldb-check:[...]$8 = Yep(10.5, NestedNonZeroField { a: 10, b: 20, c: &[...] })
78
+
79
+ // lldb-command:print nested_non_zero_nope
80
+ // lldb-check:[...]$9 = Nope
81
+
70
82
71
83
#![ omit_gdb_pretty_printer_section]
72
84
@@ -102,6 +114,17 @@ struct NamedFieldsRepr<'a> {
102
114
internals : & ' a isize
103
115
}
104
116
117
+ struct NestedNonZeroField < ' a > {
118
+ a : u16 ,
119
+ b : u32 ,
120
+ c : & ' a char ,
121
+ }
122
+
123
+ enum NestedNonZero < ' a > {
124
+ Yep ( f64 , NestedNonZeroField < ' a > ) ,
125
+ Nope
126
+ }
127
+
105
128
fn main ( ) {
106
129
107
130
let some_str: Option < & ' static str > = Some ( "abc" ) ;
@@ -124,6 +147,17 @@ fn main() {
124
147
let void_droid = NamedFields :: Void ;
125
148
let void_droid_gdb: & NamedFieldsRepr = unsafe { std:: mem:: transmute ( & NamedFields :: Void ) } ;
126
149
150
+ let x = 'x' ;
151
+ let nested_non_zero_yep = NestedNonZero :: Yep (
152
+ 10.5 ,
153
+ NestedNonZeroField {
154
+ a : 10 ,
155
+ b : 20 ,
156
+ c : & x
157
+ } ) ;
158
+
159
+ let nested_non_zero_nope = NestedNonZero :: Nope ;
160
+
127
161
zzz ( ) ; // #break
128
162
}
129
163
0 commit comments