3 #![allow(unused_variables)]
4 // Test that when there is a conditional (but blanket) impl and a
5 // where clause, we don't get confused in trait resolution.
9 // pretty-expanded FIXME #23616
14 fn foo(&mut self, msg
: M
);
21 impl<M
, F
: Bar
<M
>> Foo
<M
> for F
{
22 fn foo(&mut self, msg
: M
) {
26 pub struct Both
<M
, F
> {
30 impl<M
, F
: Foo
<M
>> Clone
for Both
<M
, F
> {
31 fn clone(&self) -> Both
<M
, F
> {
32 Both { inner: self.inner.clone() }
36 fn repro1
<M
, F
: Foo
<M
>>(_both
: Both
<M
, F
>) {
39 fn repro2
<M
, F
: Foo
<M
>>(msg
: M
, foo
: F
) {
40 let both
= Both { inner: Rc::new((msg, foo)) }
;
41 repro1(both
.clone()); // <--- This clone causes problem