Skip to content

Commit

Permalink
Review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Oct 26, 2024
1 parent 98abfff commit e9c3954
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 158 deletions.
151 changes: 0 additions & 151 deletions compiler/rustc_ast_lowering/src/lifetime_collector.rs

This file was deleted.

5 changes: 0 additions & 5 deletions compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2849,11 +2849,6 @@ pub enum TyKind<'hir> {
/// Type parameters may be stored in each `PathSegment`.
Path(QPath<'hir>),
/// An opaque type definition itself. This is only used for `impl Trait`.
///
/// The generic argument list contains the lifetimes (and in the future
/// possibly parameters) that are actually bound on the `impl Trait`.
///
/// The last parameter specifies whether this opaque appears in a trait definition.
OpaqueDef(&'hir OpaqueTy<'hir>),
/// A trait object type `Bound1 + Bound2 + Bound3`
/// where `Bound` is a trait or a lifetime.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ enum Scope<'a> {
/// `fn foo<'a>() -> impl MyTrait<'a> { ... }`
///
/// HIR tells us that `'a` refer to the lifetime bound on `foo`.
/// However, typeck and borrowck for opaques are work based on using a new generics type.
/// However, typeck and borrowck for opaques work based on using a new generic type.
/// `type MyAnonTy<'b> = impl MyTrait<'b>;`
///
/// This scope collects the mapping `'a -> 'b`.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/late.rs
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ impl<'ra: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'_, 'ast, 'r
self.r.record_partial_res(ty.id, PartialRes::new(res));
visit::walk_ty(self, ty)
}
TyKind::ImplTrait(_, _) => {
TyKind::ImplTrait(..) => {
let candidates = self.lifetime_elision_candidates.take();
visit::walk_ty(self, ty);
self.lifetime_elision_candidates = candidates;
Expand Down

0 comments on commit e9c3954

Please sign in to comment.