forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathignore-head-usages-provisional-cache.rs
More file actions
55 lines (49 loc) · 1.26 KB
/
Copy pathignore-head-usages-provisional-cache.rs
File metadata and controls
55 lines (49 loc) · 1.26 KB
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
51
52
53
54
55
//@ compile-flags: -Znext-solver
//@ check-pass
// A regression test for trait-system-refactor-initiative#232. We've
// previously incorrectly rebased provisional cache entries even if
// the cycle head didn't reach a fixpoint as it did not depend on any
// cycles itself.
//
// Just because the result of a goal does not depend on its own provisional
// result, it does not mean its nested goals don't depend on its result.
struct B;
struct C;
struct D;
pub trait Trait {
type Output;
}
macro_rules! k {
($t:ty) => {
<$t as Trait>::Output
};
}
trait CallB<T1, T2> {
type Output;
type Return;
}
trait CallC<T1> {
type Output;
type Return;
}
trait CallD<T1, T2> {
type Output;
}
fn foo<X, Y>()
where
X: Trait,
Y: Trait,
D: CallD<k![X], k![Y]>,
C: CallC<<D as CallD<k![X], k![Y]>>::Output>,
<C as CallC<<D as CallD<k![X], k![Y]>>::Output>>::Output: Trait,
B: CallB<
<C as CallC<<D as CallD<k![X], k![Y]>>::Output>>::Return,
<C as CallC<<D as CallD<k![X], k![Y]>>::Output>>::Output,
>,
<B as CallB<
<C as CallC<<D as CallD<k![X], k![Y]>>::Output>>::Return,
<C as CallC<<D as CallD<k![X], k![Y]>>::Output>>::Output,
>>::Output: Trait<Output = ()>,
{
}
fn main() {}