]> git.lizzy.rs Git - rust.git/blob - tests/debuginfo/name-shadowing-and-scope-nesting.rs
Rollup merge of #107819 - clubby789:x-py-root, r=jyn514
[rust.git] / tests / debuginfo / name-shadowing-and-scope-nesting.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 x
10 // gdb-check:$1 = false
11 // gdb-command:print y
12 // gdb-check:$2 = true
13 // gdb-command:continue
14
15 // gdb-command:print x
16 // gdb-check:$3 = 10
17 // gdb-command:print y
18 // gdb-check:$4 = true
19 // gdb-command:continue
20
21 // gdb-command:print x
22 // gdb-check:$5 = 10.5
23 // gdb-command:print y
24 // gdb-check:$6 = 20
25 // gdb-command:continue
26
27 // gdb-command:print x
28 // gdb-check:$7 = true
29 // gdb-command:print y
30 // gdb-check:$8 = 2220
31 // gdb-command:continue
32
33 // gdb-command:print x
34 // gdb-check:$9 = 203203.5
35 // gdb-command:print y
36 // gdb-check:$10 = 2220
37 // gdb-command:continue
38
39 // gdb-command:print x
40 // gdb-check:$11 = 10.5
41 // gdb-command:print y
42 // gdb-check:$12 = 20
43 // gdb-command:continue
44
45
46 // === LLDB TESTS ==================================================================================
47
48 // lldb-command:run
49
50 // lldb-command:print x
51 // lldbg-check:[...]$0 = false
52 // lldbr-check:(bool) x = false
53 // lldb-command:print y
54 // lldbg-check:[...]$1 = true
55 // lldbr-check:(bool) y = true
56 // lldb-command:continue
57
58 // lldb-command:print x
59 // lldbg-check:[...]$2 = 10
60 // lldbr-check:(i32) x = 10
61 // lldb-command:print y
62 // lldbg-check:[...]$3 = true
63 // lldbr-check:(bool) y = true
64 // lldb-command:continue
65
66 // lldb-command:print x
67 // lldbg-check:[...]$4 = 10.5
68 // lldbr-check:(f64) x = 10.5
69 // lldb-command:print y
70 // lldbg-check:[...]$5 = 20
71 // lldbr-check:(i32) y = 20
72 // lldb-command:continue
73
74 // lldb-command:print x
75 // lldbg-check:[...]$6 = true
76 // lldbr-check:(bool) x = true
77 // lldb-command:print y
78 // lldbg-check:[...]$7 = 2220
79 // lldbr-check:(i32) y = 2220
80 // lldb-command:continue
81
82 // lldb-command:print x
83 // lldbg-check:[...]$8 = 203203.5
84 // lldbr-check:(f64) x = 203203.5
85 // lldb-command:print y
86 // lldbg-check:[...]$9 = 2220
87 // lldbr-check:(i32) y = 2220
88 // lldb-command:continue
89
90 // lldb-command:print x
91 // lldbg-check:[...]$10 = 10.5
92 // lldbr-check:(f64) x = 10.5
93 // lldb-command:print y
94 // lldbg-check:[...]$11 = 20
95 // lldbr-check:(i32) y = 20
96 // lldb-command:continue
97
98 #![feature(omit_gdb_pretty_printer_section)]
99 #![omit_gdb_pretty_printer_section]
100
101 fn main() {
102     let x = false;
103     let y = true;
104
105     zzz(); // #break
106     sentinel();
107
108     let x = 10;
109
110     zzz(); // #break
111     sentinel();
112
113     let x = 10.5f64;
114     let y = 20;
115
116     zzz(); // #break
117     sentinel();
118
119     {
120         let x = true;
121         let y = 2220;
122
123         zzz(); // #break
124         sentinel();
125
126         let x = 203203.5f64;
127
128         zzz(); // #break
129         sentinel();
130     }
131
132     zzz(); // #break
133     sentinel();
134 }
135
136 fn zzz() {()}
137 fn sentinel() {()}