diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2022-07-12 09:10:22 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2022-07-30 15:59:17 -0500 |
| commit | cf2433a74f7474f7d41e9842d7de465b0966831a (patch) | |
| tree | 052e864c933d409ad398e7e146fecbafd287a63b /compiler/rustc_const_eval/src/interpret | |
| parent | 1202bbaf48a0a919a2e0cfd8b7dce97e8fc3030d (diff) | |
| download | rust-cf2433a74f7474f7d41e9842d7de465b0966831a.tar.gz rust-cf2433a74f7474f7d41e9842d7de465b0966831a.zip | |
Use LocalDefId for closures more
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/validity.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index d20f16755c3..6f6717721fb 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -238,7 +238,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' if let Some(local_def_id) = def_id.as_local() { let tables = self.ecx.tcx.typeck(local_def_id); if let Some(captured_place) = - tables.closure_min_captures_flattened(*def_id).nth(field) + tables.closure_min_captures_flattened(local_def_id).nth(field) { // Sometimes the index is beyond the number of upvars (seen // for a generator). |
