2014-02-07 20:08:32 +01:00
|
|
|
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
|
2013-06-24 17:47:21 +02:00
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2014-02-07 20:08:32 +01:00
|
|
|
// ignore-android: FIXME(#10381)
|
2013-12-13 15:45:08 -08:00
|
|
|
|
2014-04-14 21:00:31 +05:30
|
|
|
#![feature(managed_boxes)]
|
2013-10-23 04:49:18 -04:00
|
|
|
|
2013-06-27 19:27:06 +02:00
|
|
|
// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
|
2013-06-24 17:47:21 +02:00
|
|
|
// its numerical value.
|
|
|
|
|
2014-02-06 19:57:09 -08:00
|
|
|
// compile-flags:-g
|
2013-09-06 16:00:08 +02:00
|
|
|
// debugger:rbreak zzz
|
2013-06-24 17:47:21 +02:00
|
|
|
// debugger:run
|
|
|
|
// debugger:finish
|
|
|
|
// debugger:print *bool_ref
|
|
|
|
// check:$1 = true
|
|
|
|
|
|
|
|
// debugger:print *int_ref
|
|
|
|
// check:$2 = -1
|
|
|
|
|
|
|
|
// debugger:print *char_ref
|
|
|
|
// check:$3 = 97
|
|
|
|
|
|
|
|
// debugger:print/d *i8_ref
|
|
|
|
// check:$4 = 68
|
|
|
|
|
|
|
|
// debugger:print *i16_ref
|
|
|
|
// check:$5 = -16
|
|
|
|
|
|
|
|
// debugger:print *i32_ref
|
|
|
|
// check:$6 = -32
|
|
|
|
|
|
|
|
// debugger:print *i64_ref
|
|
|
|
// check:$7 = -64
|
|
|
|
|
|
|
|
// debugger:print *uint_ref
|
|
|
|
// check:$8 = 1
|
|
|
|
|
|
|
|
// debugger:print/d *u8_ref
|
|
|
|
// check:$9 = 100
|
|
|
|
|
|
|
|
// debugger:print *u16_ref
|
|
|
|
// check:$10 = 16
|
|
|
|
|
|
|
|
// debugger:print *u32_ref
|
|
|
|
// check:$11 = 32
|
|
|
|
|
|
|
|
// debugger:print *u64_ref
|
|
|
|
// check:$12 = 64
|
|
|
|
|
|
|
|
// debugger:print *f32_ref
|
2013-09-26 02:26:09 -04:00
|
|
|
// check:$13 = 2.5
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
// debugger:print *f64_ref
|
2013-09-26 02:26:09 -04:00
|
|
|
// check:$14 = 3.5
|
2013-06-24 17:47:21 +02:00
|
|
|
|
2014-04-14 21:00:31 +05:30
|
|
|
#![allow(unused_variable)]
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let bool_box: @bool = @true;
|
2013-07-16 12:17:55 +02:00
|
|
|
let bool_ref: &bool = bool_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let int_box: @int = @-1;
|
2013-07-16 12:17:55 +02:00
|
|
|
let int_ref: &int = int_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let char_box: @char = @'a';
|
2013-07-16 12:17:55 +02:00
|
|
|
let char_ref: &char = char_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let i8_box: @i8 = @68;
|
2013-07-16 12:17:55 +02:00
|
|
|
let i8_ref: &i8 = i8_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let i16_box: @i16 = @-16;
|
2013-07-16 12:17:55 +02:00
|
|
|
let i16_ref: &i16 = i16_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let i32_box: @i32 = @-32;
|
2013-07-16 12:17:55 +02:00
|
|
|
let i32_ref: &i32 = i32_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let i64_box: @i64 = @-64;
|
2013-07-16 12:17:55 +02:00
|
|
|
let i64_ref: &i64 = i64_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let uint_box: @uint = @1;
|
2013-07-16 12:17:55 +02:00
|
|
|
let uint_ref: &uint = uint_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let u8_box: @u8 = @100;
|
2013-07-16 12:17:55 +02:00
|
|
|
let u8_ref: &u8 = u8_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let u16_box: @u16 = @16;
|
2013-07-16 12:17:55 +02:00
|
|
|
let u16_ref: &u16 = u16_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let u32_box: @u32 = @32;
|
2013-07-16 12:17:55 +02:00
|
|
|
let u32_ref: &u32 = u32_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let u64_box: @u64 = @64;
|
2013-07-16 12:17:55 +02:00
|
|
|
let u64_ref: &u64 = u64_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let f32_box: @f32 = @2.5;
|
2013-07-16 12:17:55 +02:00
|
|
|
let f32_ref: &f32 = f32_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
|
|
|
|
let f64_box: @f64 = @3.5;
|
2013-07-16 12:17:55 +02:00
|
|
|
let f64_ref: &f64 = f64_box;
|
2013-06-24 17:47:21 +02:00
|
|
|
zzz();
|
|
|
|
}
|
|
|
|
|
2013-08-17 08:37:42 -07:00
|
|
|
fn zzz() {()}
|