about summary refs log tree commit diff
path: root/compiler/rustc_save_analysis/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-07-14 14:14:21 +0530
committerGitHub <noreply@github.com>2022-07-14 14:14:21 +0530
commite5a86d7358520477b816e118200fc7dc664b3f6e (patch)
treecc3b8f12948902b3551659742f499570ccce5951 /compiler/rustc_save_analysis/src
parent103b8602b7e3cfc8301ab9e0981563bde3789ea7 (diff)
parent9aa142b5f1cf85e9941f7f9a35caa604500dab8b (diff)
downloadrust-e5a86d7358520477b816e118200fc7dc664b3f6e.tar.gz
rust-e5a86d7358520477b816e118200fc7dc664b3f6e.zip
Rollup merge of #98705 - WaffleLapkin:closure_binder, r=cjgillot
Implement `for<>` lifetime binder for closures

This PR implements RFC 3216 ([TI](https://github.com/rust-lang/rust/issues/97362)) and allows code like the following:

```rust
let _f = for<'a, 'b> |a: &'a A, b: &'b B| -> &'b C { b.c(a) };
//       ^^^^^^^^^^^--- new!
```

cc ``@Aaron1011`` ``@cjgillot``
Diffstat (limited to 'compiler/rustc_save_analysis/src')
-rw-r--r--compiler/rustc_save_analysis/src/dump_visitor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_save_analysis/src/dump_visitor.rs b/compiler/rustc_save_analysis/src/dump_visitor.rs
index a4175f4c5f3..e2e0e1f5b30 100644
--- a/compiler/rustc_save_analysis/src/dump_visitor.rs
+++ b/compiler/rustc_save_analysis/src/dump_visitor.rs
@@ -1353,7 +1353,7 @@ impl<'tcx> Visitor<'tcx> for DumpVisitor<'tcx> {
                     }
                 }
             }
-            hir::ExprKind::Closure { ref fn_decl, body, .. } => {
+            hir::ExprKind::Closure(&hir::Closure { ref fn_decl, body, .. }) => {
                 let id = format!("${}", ex.hir_id);
 
                 // walk arg and return types