3 // "guessing" in trait selection can affect `copy_or_move`. Check that this
4 // is correctly handled. I am not sure what is the "correct" behaviour,
5 // but we should at least not ICE.
11 struct S
<'a
,T
:'a
>(&'a T
);
12 impl<'a
, T
> Clone
for S
<'a
, T
> { fn clone(&self) -> Self { S(self.0) }
}
13 /// This impl triggers inference "guessing" - S<_>: Copy => _ = U
14 impl<'a
> Copy
for S
<'a
, Option
<U
>> {}
16 fn assert_impls_fn
<R
,T
: Fn()->R
>(_
: &T
){}
22 // S being copy is critical for this to work
27 assert_eq
!(f(), 1337+1);
30 // S being Copy is not critical here, but
31 // we check it anyway.
34 let ret
= mem
::size_of_val(e
.0);