diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-01-23 22:15:33 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-02-02 23:09:51 +0000 |
| commit | 0241c29123c7a49b5fdcc99e32b605124abe4e09 (patch) | |
| tree | 52a02c696b8855753735b1c3eb5cd023a291b456 /compiler/rustc_mir_transform | |
| parent | f3126500f25114ba4e0ac3e76694dd45a22de56d (diff) | |
| download | rust-0241c29123c7a49b5fdcc99e32b605124abe4e09.tar.gz rust-0241c29123c7a49b5fdcc99e32b605124abe4e09.zip | |
Put a DefId in AggregateKind.
Diffstat (limited to 'compiler/rustc_mir_transform')
| -rw-r--r-- | compiler/rustc_mir_transform/src/check_unsafety.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/src/check_unsafety.rs b/compiler/rustc_mir_transform/src/check_unsafety.rs index 8afa53313fc..d00ee1f4bab 100644 --- a/compiler/rustc_mir_transform/src/check_unsafety.rs +++ b/compiler/rustc_mir_transform/src/check_unsafety.rs @@ -126,6 +126,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> { } } &AggregateKind::Closure(def_id, _) | &AggregateKind::Generator(def_id, _, _) => { + let def_id = def_id.expect_local(); let UnsafetyCheckResult { violations, used_unsafe_blocks, .. } = self.tcx.unsafety_check_result(def_id); self.register_violations(violations, used_unsafe_blocks.iter().copied()); |
