Put a DefId in AggregateKind.
This commit is contained in:
parent
f3126500f2
commit
0241c29123
10 changed files with 33 additions and 17 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue