From b83235f76f6afd4c95f769d19a818be7f5e1c00a Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Fri, 23 Oct 2015 20:15:33 -0400 Subject: [PATCH] Add test for #22403 Closes #22403. --- src/test/run-pass/issue-22403.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/run-pass/issue-22403.rs diff --git a/src/test/run-pass/issue-22403.rs b/src/test/run-pass/issue-22403.rs new file mode 100644 index 0000000000000..7bd66e5a83d46 --- /dev/null +++ b/src/test/run-pass/issue-22403.rs @@ -0,0 +1,15 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let x = Box::new([1, 2, 3]); + let y = x as Box<[i32]>; + println!("y: {:?}", y); +}