From 510372129e6e7a536e3fde0e2d82c0878f1344ec Mon Sep 17 00:00:00 2001 From: Piotr Jawniak Date: Fri, 27 Jun 2014 11:30:51 +0200 Subject: [PATCH] Add test for #11677 This code used to cause an ICE Closes #11677 --- src/test/run-pass/issue-11677.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/test/run-pass/issue-11677.rs diff --git a/src/test/run-pass/issue-11677.rs b/src/test/run-pass/issue-11677.rs new file mode 100644 index 00000000000..5a244250852 --- /dev/null +++ b/src/test/run-pass/issue-11677.rs @@ -0,0 +1,24 @@ +// Copyright 2014 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. + +#![allow(dead_code)] + +// this code used to cause an ICE + +trait X {} + +struct S {f: Box>, g: Box>} + +struct F; +impl X for F {} + +fn main() { + S {f: box F, g: box F}; +}