Rollup merge of #138954 - compiler-errors:hash-opaques, r=oli-obk

Ensure `define_opaque` attrs are accounted for in HIR hash

Fixes #138948

r? oli-obk
This commit is contained in:
Stuart Cook 2025-03-26 19:40:30 +11:00 committed by GitHub
commit 19a53b7d3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 3 deletions

View file

@ -623,7 +623,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
// Don't hash unless necessary, because it's expensive.
let (opt_hash_including_bodies, attrs_hash) =
self.tcx.hash_owner_nodes(node, &bodies, &attrs);
self.tcx.hash_owner_nodes(node, &bodies, &attrs, define_opaque);
let num_nodes = self.item_local_id_counter.as_usize();
let (nodes, parenting) = index::index_hir(self.tcx, node, &bodies, num_nodes);
let nodes = hir::OwnerNodes { opt_hash_including_bodies, nodes, bodies };