Intern OpaqueTy on ItemKind::OpaqueTy

This commit is contained in:
Santiago Pastorino
2023-06-22 20:53:20 -03:00
parent 72a32583d1
commit d70deac161
9 changed files with 9 additions and 9 deletions

View File

@@ -144,7 +144,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
Some(tcx.typeck_root_def_id(def_id.to_def_id()))
}
Node::Item(item) => match item.kind {
ItemKind::OpaqueTy(hir::OpaqueTy {
ItemKind::OpaqueTy(&hir::OpaqueTy {
origin:
hir::OpaqueTyOrigin::FnReturn(fn_def_id) | hir::OpaqueTyOrigin::AsyncFn(fn_def_id),
in_trait,