summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lazy-type-alias-impl-trait/nested.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lazy-type-alias-impl-trait/nested.rs')
-rw-r--r--src/test/ui/lazy-type-alias-impl-trait/nested.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/lazy-type-alias-impl-trait/nested.rs b/src/test/ui/lazy-type-alias-impl-trait/nested.rs
new file mode 100644
index 000000000..f82911127
--- /dev/null
+++ b/src/test/ui/lazy-type-alias-impl-trait/nested.rs
@@ -0,0 +1,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,
+}