]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/borrowed-tuple.rs
Rollup merge of #56476 - GuillaumeGomez:invalid-line-number-match, r=QuietMisdreavus
[rust.git] / src / test / debuginfo / borrowed-tuple.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 *stack_val_ref
20 // gdbg-check:$1 = {__0 = -14, __1 = -19}
21 // gdbr-check:$1 = (-14, -19)
22
23 // gdb-command:print *ref_to_unnamed
24 // gdbg-check:$2 = {__0 = -15, __1 = -20}
25 // gdbr-check:$2 = (-15, -20)
26
27 // gdb-command:print *unique_val_ref
28 // gdbg-check:$3 = {__0 = -17, __1 = -22}
29 // gdbr-check:$3 = (-17, -22)
30
31
32 // === LLDB TESTS ==================================================================================
33
34 // lldb-command:run
35
36 // lldb-command:print *stack_val_ref
37 // lldbg-check:[...]$0 = (-14, -19)
38 // lldbr-check:((i16, f32)) *stack_val_ref = { = -14 = -19 }
39
40 // lldb-command:print *ref_to_unnamed
41 // lldbg-check:[...]$1 = (-15, -20)
42 // lldbr-check:((i16, f32)) *ref_to_unnamed = { = -15 = -20 }
43
44 // lldb-command:print *unique_val_ref
45 // lldbg-check:[...]$2 = (-17, -22)
46 // lldbr-check:((i16, f32)) *unique_val_ref = { = -17 = -22 }
47
48
49 #![allow(unused_variables)]
50 #![feature(box_syntax)]
51 #![feature(omit_gdb_pretty_printer_section)]
52 #![omit_gdb_pretty_printer_section]
53
54 fn main() {
55     let stack_val: (i16, f32) = (-14, -19f32);
56     let stack_val_ref: &(i16, f32) = &stack_val;
57     let ref_to_unnamed: &(i16, f32) = &(-15, -20f32);
58
59     let unique_val: Box<(i16, f32)> = box (-17, -22f32);
60     let unique_val_ref: &(i16, f32) = &*unique_val;
61
62     zzz(); // #break
63 }
64
65 fn zzz() {()}