about summary refs log tree commit diff
path: root/src/test/ui/impl-trait/issues/issue-88236.rs
blob: 2ea35270a7e3b5cc0e6784bc8bff5375d7e693d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// check-pass

// this used to cause stack overflows

trait Hrtb<'a> {
    type Assoc;
}

impl<'a> Hrtb<'a> for () {
    type Assoc = ();
}

impl<'a> Hrtb<'a> for &'a () {
    type Assoc = ();
}

fn make_impl() -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {}

fn main() {}