1
Fork 0

use opaque_ty_origin_unchecked instead of destructuring HIR

This commit is contained in:
Michael Goulet 2022-07-17 10:37:23 -07:00
parent e8d9f38141
commit 5a4601fea5
2 changed files with 5 additions and 13 deletions

View file

@ -433,7 +433,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
}
#[instrument(skip(self), level = "trace")]
fn opaque_ty_origin_unchecked(&self, def_id: LocalDefId, span: Span) -> OpaqueTyOrigin {
pub fn opaque_ty_origin_unchecked(&self, def_id: LocalDefId, span: Span) -> OpaqueTyOrigin {
let origin = match self.tcx.hir().expect_item(def_id).kind {
hir::ItemKind::OpaqueTy(hir::OpaqueTy { origin, .. }) => origin,
ref itemkind => {