Use LocalDefId for closures more
This commit is contained in:
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user