16
16
// gdbg-check:$3 = {pointer = [...], vtable = [...]}
17
17
// gdbr-check:$3 = &unsized::Foo<dyn core::fmt::Debug> {pointer: [...], vtable: [...]}
18
18
19
+ // gdb-command:print tuple_slice
20
+ // gdbg-check:$4 = {data_ptr = [...], length = 2}
21
+ // gdbr-check:$4 = &(i32, i32, [i32]) {data_ptr: [...], length: 2}
22
+
23
+ // gdb-command:print tuple_dyn
24
+ // gdbg-check:$5 = {pointer = [...], vtable = [...]}
25
+ // gdbr-check:$5 = &(i32, i32, dyn core::fmt::Debug) {pointer: [...], vtable: [...]}
26
+
19
27
// === CDB TESTS ===================================================================================
20
28
21
29
// cdb-command: g
34
42
// cdb-check: [+0x000] pointer : 0x[...] [Type: unsized::Foo<dyn$<core::fmt::Debug> > *]
35
43
// cdb-check: [...] vtable : 0x[...] [Type: unsigned [...]int[...] (*)[3]]
36
44
45
+ // cdb-command:dx tuple_slice
46
+ // cdb-check:tuple_slice [Type: ref$<tuple$<i32,i32,slice$<i32> > >]
47
+ // cdb-check: [+0x000] data_ptr : 0x[...] [Type: tuple$<i32,i32,slice$<i32> > *]
48
+ // cdb-check: [...] length : 0x2 [Type: unsigned [...]int[...]
49
+
50
+ // cdb-command:dx tuple_dyn
51
+ // cdb-check:tuple_dyn [Type: ref$<tuple$<i32,i32,dyn$<core::fmt::Debug> > >]
52
+ // cdb-check: [+0x000] pointer : 0x[...] [Type: tuple$<i32,i32,dyn$<core::fmt::Debug> > *]
53
+ // cdb-check: [...] vtable : 0x[...] [Type: unsigned [...]int[...] (*)[3]]
54
+
55
+ #![ feature( unsized_tuple_coercion) ]
37
56
#![ feature( omit_gdb_pretty_printer_section) ]
38
57
#![ omit_gdb_pretty_printer_section]
39
58
@@ -51,6 +70,10 @@ fn main() {
51
70
let b: & Foo < Foo < [ u8 ] > > = & foo;
52
71
let c: & Foo < dyn std:: fmt:: Debug > = & Foo { value : 7i32 } ;
53
72
73
+ // Also check unsized tuples
74
+ let tuple_slice: & ( i32 , i32 , [ i32 ] ) = & ( 0 , 1 , [ 2 , 3 ] ) ;
75
+ let tuple_dyn: & ( i32 , i32 , dyn std:: fmt:: Debug ) = & ( 0 , 1 , & 3u64 ) ;
76
+
54
77
zzz ( ) ; // #break
55
78
}
56
79
0 commit comments