about summary refs log tree commit diff
path: root/tests/ui/typeck/issue-103899.rs
blob: 92356ecf288b1f0208ab66df48e60b9ea2cc5086 (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
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)

trait BaseWithAssoc {
    type Assoc;
}

trait WrapperWithAssoc {
    type BaseAssoc: BaseWithAssoc;
}

struct Wrapper<B> {
    inner: B,
}

struct ProjectToBase<T: BaseWithAssoc> {
    data_type_h: T::Assoc,
}

struct DoubleProject<L: WrapperWithAssoc> {
    buffer: Wrapper<ProjectToBase<L::BaseAssoc>>,
}

fn trigger<L: WrapperWithAssoc<BaseAssoc = ()>>() -> DoubleProject<L> {
    //~^ ERROR the trait bound `(): BaseWithAssoc` is not satisfied [E0277]
    loop {}
}

fn main() {}