summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/issue-97695-double-trivial-bound.rs
blob: 213605b51142cc98463d2a1ea05142c8a3c92321 (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
// compile-flags: -Zinline-mir --emit=mir
// build-pass

pub trait Associate {
    type Associated;
}

pub struct Wrap<'a> {
    pub field: &'a i32,
}

pub trait Create<T> {
    fn create() -> Self;
}

pub fn oh_no<'a, T>()
where
    Wrap<'a>: Associate,
    <Wrap<'a> as Associate>::Associated: Create<T>,
{
    <Wrap<'a> as Associate>::Associated::create();
}

pub fn main() {}