Skip to content

Commit

Permalink
21599
Browse files Browse the repository at this point in the history
  • Loading branch information
wheals committed Oct 26, 2015
1 parent d9f2f2c commit 8e9fd57
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/21599.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#![no_std]
#![feature(box_syntax,unique)]
#![feature(no_std,lang_items)]

use core::ptr::Unique;

#[lang="owned_box"]
pub struct Box<T>(Unique<T>);

#[lang="start"]
fn main() {
let mut test:[isize;1] = [0;1];
let a = box 5;
test[*a] = 0;
}

#[lang = "exchange_malloc"] extern fn exchange_malloc() {}
#[lang = "eh_personality"] extern fn eh_personality() {}
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop{} }

0 comments on commit 8e9fd57

Please sign in to comment.