mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
24 lines
348 B
Rust
24 lines
348 B
Rust
//@ 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,
|
|
}
|