blob: c0e628f4c46c374617baa0a44267fa0e4607b7f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
//@ known-bug: #135718
struct Equal;
struct Bar;
trait TwiceNested {}
impl<M> TwiceNested for Bar where Bar: NestMakeEqual<NestEq = M> {}
struct Sum;
trait Not {
fn not();
}
impl<P> Not for Sum
where
Bar: NestMakeEqual<NestEq = P>,
Self: Problem<P>,
{
fn not() {}
}
trait NestMakeEqual {
type NestEq;
}
trait MakeEqual {
type Eq;
}
struct Foo;
impl MakeEqual for Foo {
type Eq = Equal;
}
impl<O> NestMakeEqual for Bar
where
Foo: MakeEqual<Eq = O>,
{
type NestEq = O;
}
trait Problem<M> {}
impl Problem<()> for Sum where Bar: TwiceNested {}
impl Problem<Equal> for Sum where Bar: TwiceNested {}
fn main() {
Sum::not();
}
|