]> git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/generic-function.rs
Update unsuspicious file list
[rustc.git] / src / test / debuginfo / generic-function.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 *t0
10 // gdb-check:$1 = 1
11 // gdb-command:print *t1
12 // gdb-check:$2 = 2.5
13 // gdb-command:continue
14
15 // gdb-command:print *t0
16 // gdb-check:$3 = 3.5
17 // gdb-command:print *t1
18 // gdb-check:$4 = 4
19 // gdb-command:continue
20
21 // gdb-command:print *t0
22 // gdb-check:$5 = 5
23 // gdb-command:print *t1
24 // gdbg-check:$6 = {a = 6, b = 7.5}
25 // gdbr-check:$6 = generic_function::Struct {a: 6, b: 7.5}
26 // gdb-command:continue
27
28 // === LLDB TESTS ==================================================================================
29
30 // lldb-command:run
31
32 // lldb-command:print *t0
33 // lldbg-check:[...]$0 = 1
34 // lldbr-check:(i32) *t0 = 1
35 // lldb-command:print *t1
36 // lldbg-check:[...]$1 = 2.5
37 // lldbr-check:(f64) *t1 = 2.5
38 // lldb-command:continue
39
40 // lldb-command:print *t0
41 // lldbg-check:[...]$2 = 3.5
42 // lldbr-check:(f64) *t0 = 3.5
43 // lldb-command:print *t1
44 // lldbg-check:[...]$3 = 4
45 // lldbr-check:(u16) *t1 = 4
46 // lldb-command:continue
47
48 // lldb-command:print *t0
49 // lldbg-check:[...]$4 = 5
50 // lldbr-check:(i32) *t0 = 5
51 // lldb-command:print *t1
52 // lldbg-check:[...]$5 = { a = 6 b = 7.5 }
53 // lldbr-check:(generic_function::Struct) *t1 = { a = 6 b = 7.5 }
54 // lldb-command:continue
55
56 #![feature(omit_gdb_pretty_printer_section)]
57 #![omit_gdb_pretty_printer_section]
58
59 #[derive(Clone)]
60 struct Struct {
61 a: isize,
62 b: f64
63 }
64
65 fn dup_tup<T0: Clone, T1: Clone>(t0: &T0, t1: &T1) -> ((T0, T1), (T1, T0)) {
66 let ret = ((t0.clone(), t1.clone()), (t1.clone(), t0.clone()));
67 zzz(); // #break
68 ret
69 }
70
71 fn main() {
72
73 let _ = dup_tup(&1, &2.5f64);
74 let _ = dup_tup(&3.5f64, &4_u16);
75 let _ = dup_tup(&5, &Struct { a: 6, b: 7.5 });
76 }
77
78 fn zzz() {()}