]> git.lizzy.rs Git - rust.git/blob - tests/debuginfo/box.rs
Rollup merge of #107471 - notriddle:notriddle/default-settings, r=GuillaumeGomez
[rust.git] / tests / debuginfo / box.rs
1 // min-lldb-version: 310
2
3 // compile-flags:-g
4
5 // === GDB TESTS ===================================================================================
6
7 // gdb-command:run
8
9 // gdb-command:print *a
10 // gdb-check:$1 = 1
11 // gdb-command:print *b
12 // gdbg-check:$2 = {__0 = 2, __1 = 3.5}
13 // gdbr-check:$2 = (2, 3.5)
14
15
16 // === LLDB TESTS ==================================================================================
17
18 // lldb-command:run
19 // lldb-command:print *a
20 // lldbg-check:[...]$0 = 1
21 // lldbr-check:(i32) *a = 1
22 // lldb-command:print *b
23 // lldbg-check:[...]$1 = { 0 = 2 1 = 3.5 }
24 // lldbr-check:((i32, f64)) *b = { 0 = 2 1 = 3.5 }
25
26 #![allow(unused_variables)]
27 #![feature(omit_gdb_pretty_printer_section)]
28 #![omit_gdb_pretty_printer_section]
29
30 fn main() {
31     let a = Box::new(1);
32     let b = Box::new((2, 3.5f64));
33
34     zzz(); // #break
35 }
36
37 fn zzz() { () }