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