]> git.lizzy.rs Git - rust.git/blob - tests/debuginfo/borrowed-c-style-enum.rs
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / debuginfo / borrowed-c-style-enum.rs
1 // compile-flags:-g
2 // min-lldb-version: 310
3
4 // === GDB TESTS ===================================================================================
5
6 // gdb-command:run
7
8 // gdb-command:print *the_a_ref
9 // gdbg-check:$1 = TheA
10 // gdbr-check:$1 = borrowed_c_style_enum::ABC::TheA
11
12 // gdb-command:print *the_b_ref
13 // gdbg-check:$2 = TheB
14 // gdbr-check:$2 = borrowed_c_style_enum::ABC::TheB
15
16 // gdb-command:print *the_c_ref
17 // gdbg-check:$3 = TheC
18 // gdbr-check:$3 = borrowed_c_style_enum::ABC::TheC
19
20
21 // === LLDB TESTS ==================================================================================
22
23 // lldb-command:run
24
25 // lldb-command:print *the_a_ref
26 // lldbg-check:[...]$0 = TheA
27 // lldbr-check:(borrowed_c_style_enum::ABC) *the_a_ref = borrowed_c_style_enum::ABC::TheA
28
29 // lldb-command:print *the_b_ref
30 // lldbg-check:[...]$1 = TheB
31 // lldbr-check:(borrowed_c_style_enum::ABC) *the_b_ref = borrowed_c_style_enum::ABC::TheB
32
33 // lldb-command:print *the_c_ref
34 // lldbg-check:[...]$2 = TheC
35 // lldbr-check:(borrowed_c_style_enum::ABC) *the_c_ref = borrowed_c_style_enum::ABC::TheC
36
37 #![allow(unused_variables)]
38 #![feature(omit_gdb_pretty_printer_section)]
39 #![omit_gdb_pretty_printer_section]
40
41 enum ABC { TheA, TheB, TheC }
42
43 fn main() {
44     let the_a = ABC::TheA;
45     let the_a_ref: &ABC = &the_a;
46
47     let the_b = ABC::TheB;
48     let the_b_ref: &ABC = &the_b;
49
50     let the_c = ABC::TheC;
51     let the_c_ref: &ABC = &the_c;
52
53     zzz(); // #break
54 }
55
56 fn zzz() {()}