Handle generic parameters.
This commit is contained in:
parent
cdf78073c5
commit
05812df603
25 changed files with 171 additions and 224 deletions
|
@ -596,10 +596,6 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
}
|
||||
hir::ItemKind::ImplTraitPlaceholder(..) => {
|
||||
// FIXME(RPITIT): We don't need to do anything special here, right?
|
||||
intravisit::walk_item(self, item);
|
||||
}
|
||||
hir::ItemKind::TyAlias(_, ref generics)
|
||||
| hir::ItemKind::Enum(_, ref generics)
|
||||
| hir::ItemKind::Struct(_, ref generics)
|
||||
|
@ -719,7 +715,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
|
|||
};
|
||||
self.with(scope, |this| this.visit_ty(&mt.ty));
|
||||
}
|
||||
hir::TyKind::OpaqueDef(item_id, lifetimes) => {
|
||||
hir::TyKind::OpaqueDef(item_id, lifetimes, _in_trait) => {
|
||||
// Resolve the lifetimes in the bounds to the lifetime defs in the generics.
|
||||
// `fn foo<'a>() -> impl MyTrait<'a> { ... }` desugars to
|
||||
// `type MyAnonTy<'b> = impl MyTrait<'b>;`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue