]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/trait-object-generics.rs
4 #![feature(box_syntax)]
12 pub struct Impl
<A1
, A2
, A3
> {
13 m1
: marker
::PhantomData
<(A1
,A2
,A3
)>,
15 * With A2 we get the ICE:
16 * task <unnamed> failed at 'index out of bounds: the len is 1 but the index is 1',
17 * src/librustc/middle/subst.rs:58
19 t
: Box
<dyn Trait2
<A2
>+'
static>
22 impl<A1
, A2
, A3
> Impl
<A1
, A2
, A3
> {
30 enum Type
<T
> { Constant(T) }
33 fn method(&self, _
: Type
<(K
,V
)>) -> isize;
36 impl<V
> Trait
<u8,V
> for () {
37 fn method(&self, _x
: Type
<(u8,V
)>) -> isize { 0 }
41 let a
= box () as Box
<dyn Trait
<u8, u8>>;
42 assert_eq
!(a
.method(Type
::Constant((1, 2))), 0);