]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/generic-functions-nested.rs
Auto merge of #28816 - petrochenkov:unistruct, r=nrc
[rust.git] / src / test / debuginfo / generic-functions-nested.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 = -1
21 // gdb-command:print y
22 // gdb-check:$2 = 1
23 // gdb-command:continue
24
25 // gdb-command:print x
26 // gdb-check:$3 = -1
27 // gdb-command:print y
28 // gdb-check:$4 = 2.5
29 // gdb-command:continue
30
31 // gdb-command:print x
32 // gdb-check:$5 = -2.5
33 // gdb-command:print y
34 // gdb-check:$6 = 1
35 // gdb-command:continue
36
37 // gdb-command:print x
38 // gdb-check:$7 = -2.5
39 // gdb-command:print y
40 // gdb-check:$8 = 2.5
41 // gdb-command:continue
42
43
44 // === LLDB TESTS ==================================================================================
45
46 // lldb-command:run
47
48 // lldb-command:print x
49 // lldb-check:[...]$0 = -1
50 // lldb-command:print y
51 // lldb-check:[...]$1 = 1
52 // lldb-command:continue
53
54 // lldb-command:print x
55 // lldb-check:[...]$2 = -1
56 // lldb-command:print y
57 // lldb-check:[...]$3 = 2.5
58 // lldb-command:continue
59
60 // lldb-command:print x
61 // lldb-check:[...]$4 = -2.5
62 // lldb-command:print y
63 // lldb-check:[...]$5 = 1
64 // lldb-command:continue
65
66 // lldb-command:print x
67 // lldb-check:[...]$6 = -2.5
68 // lldb-command:print y
69 // lldb-check:[...]$7 = 2.5
70 // lldb-command:continue
71
72
73 #![feature(omit_gdb_pretty_printer_section)]
74 #![omit_gdb_pretty_printer_section]
75
76 fn outer<TA: Clone>(a: TA) {
77     inner(a.clone(), 1);
78     inner(a.clone(), 2.5f64);
79
80     fn inner<TX, TY>(x: TX, y: TY) {
81         zzz(); // #break
82     }
83 }
84
85 fn main() {
86     outer(-1);
87     outer(-2.5f64);
88 }
89
90 fn zzz() { () }