1
Fork 0

Only compute DefKind through the query.

This commit is contained in:
Camille GILLOT 2022-04-29 19:43:15 +02:00
parent 9a6fa4f118
commit e3d63203a3
3 changed files with 4 additions and 3 deletions

View file

@ -467,7 +467,7 @@ impl<'tcx> EmbargoVisitor<'tcx> {
}
let macro_module_def_id = self.tcx.local_parent(local_def_id);
if self.tcx.hir().opt_def_kind(macro_module_def_id) != Some(DefKind::Mod) {
if self.tcx.opt_def_kind(macro_module_def_id) != Some(DefKind::Mod) {
// The macro's parent doesn't correspond to a `mod`, return early (#63164, #65252).
return;
}