From 8e9fd57d98986e4f9b73775710008b0f15e3609a Mon Sep 17 00:00:00 2001
From: Shmuale Mark <shm.mark@gmail.com>
Date: Sun, 25 Oct 2015 20:16:21 -0400
Subject: [PATCH] 21599

See rust-lang/rust#21599
---
 src/21599.rs | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 src/21599.rs

diff --git a/src/21599.rs b/src/21599.rs
new file mode 100644
index 00000000..1ab74d87
--- /dev/null
+++ b/src/21599.rs
@@ -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{} }