From 5ed149504180e04ba81e308b07c2d33af1b7af49 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 21 Jun 2022 12:40:32 -0300 Subject: [PATCH] This comment is out dated and misleading Arms are about TAIT and RPIT, as the variants clearly show. --- compiler/rustc_resolve/src/late/lifetimes.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/compiler/rustc_resolve/src/late/lifetimes.rs b/compiler/rustc_resolve/src/late/lifetimes.rs index 447f4174c10d5..55574b8360739 100644 --- a/compiler/rustc_resolve/src/late/lifetimes.rs +++ b/compiler/rustc_resolve/src/late/lifetimes.rs @@ -846,8 +846,6 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> { // the opaque_ty generics let opaque_ty = self.tcx.hir().item(item_id); let (generics, bounds) = match opaque_ty.kind { - // Named opaque `impl Trait` types are reached via `TyKind::Path`. - // This arm is for `impl Trait` in the types of statics, constants and locals. hir::ItemKind::OpaqueTy(hir::OpaqueTy { origin: hir::OpaqueTyOrigin::TyAlias, .. @@ -866,7 +864,6 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> { return; } - // RPIT (return position impl trait) hir::ItemKind::OpaqueTy(hir::OpaqueTy { origin: hir::OpaqueTyOrigin::FnReturn(..) | hir::OpaqueTyOrigin::AsyncFn(..), ref generics,