]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/name-shadowing-and-scope-nesting.rs
Auto merge of #28816 - petrochenkov:unistruct, r=nrc
[rust.git] / src / test / debuginfo / name-shadowing-and-scope-nesting.rs
1 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // min-lldb-version: 310
12
13 // compile-flags:-g
14
15 // === GDB TESTS ===================================================================================
16
17 // gdb-command:run
18
19 // gdb-command:print x
20 // gdb-check:$1 = false
21 // gdb-command:print y
22 // gdb-check:$2 = true
23 // gdb-command:continue
24
25 // gdb-command:print x
26 // gdb-check:$3 = 10
27 // gdb-command:print y
28 // gdb-check:$4 = true
29 // gdb-command:continue
30
31 // gdb-command:print x
32 // gdb-check:$5 = 10.5
33 // gdb-command:print y
34 // gdb-check:$6 = 20
35 // gdb-command:continue
36
37 // gdb-command:print x
38 // gdb-check:$7 = true
39 // gdb-command:print y
40 // gdb-check:$8 = 2220
41 // gdb-command:continue
42
43 // gdb-command:print x
44 // gdb-check:$9 = 203203.5
45 // gdb-command:print y
46 // gdb-check:$10 = 2220
47 // gdb-command:continue
48
49 // gdb-command:print x
50 // gdb-check:$11 = 10.5
51 // gdb-command:print y
52 // gdb-check:$12 = 20
53 // gdb-command:continue
54
55
56 // === LLDB TESTS ==================================================================================
57
58 // lldb-command:run
59
60 // lldb-command:print x
61 // lldb-check:[...]$0 = false
62 // lldb-command:print y
63 // lldb-check:[...]$1 = true
64 // lldb-command:continue
65
66 // lldb-command:print x
67 // lldb-check:[...]$2 = 10
68 // lldb-command:print y
69 // lldb-check:[...]$3 = true
70 // lldb-command:continue
71
72 // lldb-command:print x
73 // lldb-check:[...]$4 = 10.5
74 // lldb-command:print y
75 // lldb-check:[...]$5 = 20
76 // lldb-command:continue
77
78 // lldb-command:print x
79 // lldb-check:[...]$6 = true
80 // lldb-command:print y
81 // lldb-check:[...]$7 = 2220
82 // lldb-command:continue
83
84 // lldb-command:print x
85 // lldb-check:[...]$8 = 203203.5
86 // lldb-command:print y
87 // lldb-check:[...]$9 = 2220
88 // lldb-command:continue
89
90 // lldb-command:print x
91 // lldb-check:[...]$10 = 10.5
92 // lldb-command:print y
93 // lldb-check:[...]$11 = 20
94 // lldb-command:continue
95
96 #![feature(omit_gdb_pretty_printer_section)]
97 #![omit_gdb_pretty_printer_section]
98
99 fn main() {
100     let x = false;
101     let y = true;
102
103     zzz(); // #break
104     sentinel();
105
106     let x = 10;
107
108     zzz(); // #break
109     sentinel();
110
111     let x = 10.5f64;
112     let y = 20;
113
114     zzz(); // #break
115     sentinel();
116
117     {
118         let x = true;
119         let y = 2220;
120
121         zzz(); // #break
122         sentinel();
123
124         let x = 203203.5f64;
125
126         zzz(); // #break
127         sentinel();
128     }
129
130     zzz(); // #break
131     sentinel();
132 }
133
134 fn zzz() {()}
135 fn sentinel() {()}