]> git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/basic-types-metadata.rs
Imported Upstream version 1.3.0+dfsg1
[rustc.git] / src / test / debuginfo / basic-types-metadata.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 // gdb-command:run
15 // gdb-command:whatis unit
16 // gdb-check:type = ()
17 // gdb-command:whatis b
18 // gdb-check:type = bool
19 // gdb-command:whatis i
20 // gdb-check:type = isize
21 // gdb-command:whatis c
22 // gdb-check:type = char
23 // gdb-command:whatis i8
24 // gdb-check:type = i8
25 // gdb-command:whatis i16
26 // gdb-check:type = i16
27 // gdb-command:whatis i32
28 // gdb-check:type = i32
29 // gdb-command:whatis i64
30 // gdb-check:type = i64
31 // gdb-command:whatis u
32 // gdb-check:type = usize
33 // gdb-command:whatis u8
34 // gdb-check:type = u8
35 // gdb-command:whatis u16
36 // gdb-check:type = u16
37 // gdb-command:whatis u32
38 // gdb-check:type = u32
39 // gdb-command:whatis u64
40 // gdb-check:type = u64
41 // gdb-command:whatis f32
42 // gdb-check:type = f32
43 // gdb-command:whatis f64
44 // gdb-check:type = f64
45 // gdb-command:whatis fnptr
46 // gdb-check:type = [...] (*)([...])
47 // gdb-command:info functions _yyy
48 // gdb-check:[...]![...]_yyy([...]);
49 // gdb-command:ptype closure_0
50 // gdb-check: type = struct closure {
51 // gdb-check: <no data fields>
52 // gdb-check: }
53 // gdb-command:ptype closure_1
54 // gdb-check: type = struct closure {
55 // gdb-check: bool *__0;
56 // gdb-check: }
57 // gdb-command:ptype closure_2
58 // gdb-check: type = struct closure {
59 // gdb-check: bool *__0;
60 // gdb-check: isize *__1;
61 // gdb-check: }
62
63 //
64 // gdb-command:continue
65
66 #![allow(unused_variables)]
67 #![omit_gdb_pretty_printer_section]
68
69 fn main() {
70 let unit: () = ();
71 let b: bool = false;
72 let i: isize = -1;
73 let c: char = 'a';
74 let i8: i8 = 68;
75 let i16: i16 = -16;
76 let i32: i32 = -32;
77 let i64: i64 = -64;
78 let u: usize = 1;
79 let u8: u8 = 100;
80 let u16: u16 = 16;
81 let u32: u32 = 32;
82 let u64: u64 = 64;
83 let f32: f32 = 2.5;
84 let f64: f64 = 3.5;
85 let fnptr : fn() = _zzz;
86 let closure_0 = || {};
87 let closure_1 = || { b; };
88 let closure_2 = || { if b { i } else { i }; };
89 _zzz(); // #break
90 if 1 == 1 { _yyy(); }
91 }
92
93 fn _zzz() {()}
94 fn _yyy() -> ! {panic!()}