Skip to content

Commit 6ed50f4

Browse files
committed
Rename test locals to work around LLDB bug
LLDB's expression parser can't unambiguously resolve local variables in some cases, as described in rust-lang#47938. Work around this by using names that don't shadow direct submodules of `core`.
1 parent 59cc53e commit 6ed50f4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/test/debuginfo/boxed-struct.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
// gdb-command:run
1010

11-
// gdb-command:print *unique
11+
// gdb-command:print *boxed_with_padding
1212
// gdbg-check:$1 = {x = 99, y = 999, z = 9999, w = 99999}
1313
// gdbr-check:$1 = boxed_struct::StructWithSomePadding {x: 99, y: 999, z: 9999, w: 99999}
1414

15-
// gdb-command:print *unique_dtor
15+
// gdb-command:print *boxed_with_dtor
1616
// gdbg-check:$2 = {x = 77, y = 777, z = 7777, w = 77777}
1717
// gdbr-check:$2 = boxed_struct::StructWithDestructor {x: 77, y: 777, z: 7777, w: 77777}
1818

@@ -21,13 +21,13 @@
2121

2222
// lldb-command:run
2323

24-
// lldb-command:print *unique
24+
// lldb-command:print *boxed_with_padding
2525
// lldbg-check:[...]$0 = StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 }
26-
// lldbr-check:(boxed_struct::StructWithSomePadding) *unique = StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 }
26+
// lldbr-check:(boxed_struct::StructWithSomePadding) *boxed_with_padding = StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 }
2727

28-
// lldb-command:print *unique_dtor
28+
// lldb-command:print *boxed_with_dtor
2929
// lldbg-check:[...]$1 = StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 }
30-
// lldbr-check:(boxed_struct::StructWithDestructor) *unique_dtor = StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 }
30+
// lldbr-check:(boxed_struct::StructWithDestructor) *boxed_with_dtor = StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 }
3131

3232
#![allow(unused_variables)]
3333
#![feature(box_syntax)]
@@ -54,9 +54,9 @@ impl Drop for StructWithDestructor {
5454

5555
fn main() {
5656

57-
let unique: Box<_> = box StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 };
57+
let boxed_with_padding: Box<_> = box StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 };
5858

59-
let unique_dtor: Box<_> = box StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 };
59+
let boxed_with_dtor: Box<_> = box StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 };
6060
zzz(); // #break
6161
}
6262

0 commit comments

Comments
 (0)