1
Fork 0

Rollup merge of #99186 - camsteffen:closure-localdefid, r=cjgillot

Use LocalDefId for closures more
This commit is contained in:
Dylan DPC 2022-07-31 17:36:40 +05:30 committed by GitHub
commit 403c1b3802
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 164 additions and 171 deletions

View file

@ -129,7 +129,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> {
}
&AggregateKind::Closure(def_id, _) | &AggregateKind::Generator(def_id, _, _) => {
let UnsafetyCheckResult { violations, used_unsafe_blocks, .. } =
self.tcx.unsafety_check_result(def_id.expect_local());
self.tcx.unsafety_check_result(def_id);
self.register_violations(
violations,
used_unsafe_blocks.iter().map(|(&h, &d)| (h, d)),