X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fdebuginfo%2Funsized.rs;h=7cb0002ca512510020aa49d8f3a2a85af530490d;hb=b70b01b11250b5dc8f300d26fe1dba8b5d189999;hp=7ccc88ef940dcfa441f4a217fa92651607cbb3da;hpb=2567d0f8837d351beba9c30545833fdf4bdc7054;p=rust.git diff --git a/src/test/debuginfo/unsized.rs b/src/test/debuginfo/unsized.rs index 7ccc88ef940..7cb0002ca51 100644 --- a/src/test/debuginfo/unsized.rs +++ b/src/test/debuginfo/unsized.rs @@ -16,13 +16,17 @@ // gdbg-check:$3 = {pointer = [...], vtable = [...]} // gdbr-check:$3 = &unsized::Foo {pointer: [...], vtable: [...]} +// gdb-command:print _box +// gdbg-check:$4 = {pointer = [...], vtable = [...]} +// gdbr-check:$4 = alloc::boxed::Box, alloc::alloc::Global> {pointer: [...], vtable: [...]} + // gdb-command:print tuple_slice -// gdbg-check:$4 = {data_ptr = [...], length = 2} -// gdbr-check:$4 = &(i32, i32, [i32]) {data_ptr: [...], length: 2} +// gdbg-check:$5 = {data_ptr = [...], length = 2} +// gdbr-check:$5 = &(i32, i32, [i32]) {data_ptr: [...], length: 2} // gdb-command:print tuple_dyn -// gdbg-check:$5 = {pointer = [...], vtable = [...]} -// gdbr-check:$5 = &(i32, i32, dyn core::fmt::Debug) {pointer: [...], vtable: [...]} +// gdbg-check:$6 = {pointer = [...], vtable = [...]} +// gdbr-check:$6 = &(i32, i32, dyn core::fmt::Debug) {pointer: [...], vtable: [...]} // === CDB TESTS =================================================================================== @@ -42,6 +46,12 @@ // cdb-check: [+0x000] pointer : 0x[...] [Type: unsized::Foo > *] // cdb-check: [...] vtable : 0x[...] [Type: unsigned [...]int[...] (*)[3]] +// cdb-command:dx _box +// cdb-check: +// cdb-check:_box [Type: alloc::boxed::Box >,alloc::alloc::Global>] +// cdb-check:[+0x000] pointer : 0x[...] [Type: unsized::Foo > *] +// cdb-check:[...] vtable : 0x[...] [Type: unsigned [...]int[...] (*)[3]] + // cdb-command:dx tuple_slice // cdb-check:tuple_slice [Type: ref$ > >] // cdb-check: [+0x000] data_ptr : 0x[...] [Type: tuple$ > *] @@ -69,6 +79,7 @@ fn main() { let a: &Foo<[u8]> = &foo.value; let b: &Foo> = &foo; let c: &Foo = &Foo { value: 7i32 }; + let _box: Box> = Box::new(Foo { value: 8i32 }); // Also check unsized tuples let tuple_slice: &(i32, i32, [i32]) = &(0, 1, [2, 3]);