Only store a LocalDefId in hir::Item.

Items are guaranteed to be HIR owner.
This commit is contained in:
Camille GILLOT
2021-01-30 17:47:51 +01:00
parent bd3cd5dbed
commit cebbba081e
86 changed files with 483 additions and 565 deletions

View File

@@ -142,8 +142,8 @@ impl<'tcx, T: LateLintPass<'tcx>> hir_visit::Visitor<'tcx> for LateContextAndPas
self.context.generics = it.kind.generics();
let old_cached_typeck_results = self.context.cached_typeck_results.take();
let old_enclosing_body = self.context.enclosing_body.take();
self.with_lint_attrs(it.hir_id, &it.attrs, |cx| {
cx.with_param_env(it.hir_id, |cx| {
self.with_lint_attrs(it.hir_id(), &it.attrs, |cx| {
cx.with_param_env(it.hir_id(), |cx| {
lint_callback!(cx, check_item, it);
hir_visit::walk_item(cx, it);
lint_callback!(cx, check_item_post, it);