summaryrefslogtreecommitdiffstats
path: root/tests/ui/lazy-type-alias-impl-trait/nested.rs
blob: f8291112739c116d0550b51f13b281a5747c40b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// check-pass

fn main() {}

struct RawTableInner<A> {
    alloc: A,
}

impl<A> RawTableInner<A> {
    fn prepare_resize(
        self,
    ) -> ScopeGuard<Self, impl FnMut(&mut Self)> {
        ScopeGuard { dropfn: move |self_| {}, value: self,  }
    }
}

pub struct ScopeGuard<T, F>
where
    F: FnMut(&mut T),
{
    dropfn: F,
    value: T,
}