1 // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
13 #![allow(unknown_features)]
14 #![feature(box_syntax)]
20 pub struct Impl<A1, A2, A3> {
22 * With A2 we get the ICE:
23 * task <unnamed> failed at 'index out of bounds: the len is 1 but the index is 1',
24 * src/librustc/middle/subst.rs:58
26 t: Box<Trait2<A2>+'static>
29 impl<A1, A2, A3> Impl<A1, A2, A3> {
37 enum Type<T> { Constant }
40 fn method(&self,Type<(K,V)>) -> int;
43 impl<V> Trait<u8,V> for () {
44 fn method(&self, _x: Type<(u8,V)>) -> int { 0 }
48 let a = box() () as Box<Trait<u8, u8>>;
49 assert_eq!(a.method(Type::Constant), 0);