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.
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.
11 // ignore-android: FIXME(#10381)
13 // Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
14 // its numerical value.
17 // debugger:rbreak zzz
20 // debugger:print *bool_ref
23 // debugger:print *int_ref
26 // debugger:print *char_ref
29 // debugger:print/d *i8_ref
32 // debugger:print *i16_ref
35 // debugger:print *i32_ref
38 // debugger:print *i64_ref
41 // debugger:print *uint_ref
44 // debugger:print/d *u8_ref
47 // debugger:print *u16_ref
50 // debugger:print *u32_ref
53 // debugger:print *u64_ref
56 // debugger:print *f32_ref
59 // debugger:print *f64_ref
62 #![allow(unused_variable)]
66 let bool_box: Box<bool> = box true;
67 let bool_ref: &bool = bool_box;
69 let int_box: Box<int> = box -1;
70 let int_ref: &int = int_box;
72 let char_box: Box<char> = box 'a';
73 let char_ref: &char = char_box;
75 let i8_box: Box<i8> = box 68;
76 let i8_ref: &i8 = i8_box;
78 let i16_box: Box<i16> = box -16;
79 let i16_ref: &i16 = i16_box;
81 let i32_box: Box<i32> = box -32;
82 let i32_ref: &i32 = i32_box;
84 let i64_box: Box<i64> = box -64;
85 let i64_ref: &i64 = i64_box;
87 let uint_box: Box<uint> = box 1;
88 let uint_ref: &uint = uint_box;
90 let u8_box: Box<u8> = box 100;
91 let u8_ref: &u8 = u8_box;
93 let u16_box: Box<u16> = box 16;
94 let u16_ref: &u16 = u16_box;
96 let u32_box: Box<u32> = box 32;
97 let u32_ref: &u32 = u32_box;
99 let u64_box: Box<u64> = box 64;
100 let u64_ref: &u64 = u64_box;
102 let f32_box: Box<f32> = box 2.5;
103 let f32_ref: &f32 = f32_box;
105 let f64_box: Box<f64> = box 3.5;
106 let f64_ref: &f64 = f64_box;