Rollup merge of #98881 - cjgillot:q-def-kind, r=fee1-dead

Only compute DefKind through the query.
This commit is contained in:
Dylan DPC 2022-07-06 14:49:08 +05:30 committed by GitHub
commit 707c0d9a2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 7 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;
}