1
Fork 0

Intern OpaqueTy on ItemKind::OpaqueTy

This commit is contained in:
Santiago Pastorino 2023-06-22 20:53:20 -03:00
parent 72a32583d1
commit d70deac161
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
9 changed files with 9 additions and 9 deletions

View file

@ -1658,7 +1658,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
span: Span,
opaque_ty_span: Span,
) -> hir::OwnerNode<'hir> {
let opaque_ty_item_kind = hir::ItemKind::OpaqueTy(opaque_ty_item);
let opaque_ty_item_kind = hir::ItemKind::OpaqueTy(self.arena.alloc(opaque_ty_item));
// Generate an `type Foo = impl Trait;` declaration.
trace!("registering opaque type with id {:#?}", opaque_ty_id);
let opaque_ty_item = hir::Item {