1
Fork 0

Deduplicate visitor.

This commit is contained in:
Camille GILLOT 2022-11-14 18:20:49 +00:00
parent d470ac9334
commit 3afec247cb
2 changed files with 22 additions and 99 deletions

View file

@ -423,9 +423,9 @@ impl<'tcx> InferCtxt<'tcx> {
//
// We ignore any type parameters because impl trait values are assumed to
// capture all the in-scope type parameters.
struct ConstrainOpaqueTypeRegionVisitor<'tcx, OP> {
tcx: TyCtxt<'tcx>,
op: OP,
pub struct ConstrainOpaqueTypeRegionVisitor<'tcx, OP: FnMut(ty::Region<'tcx>)> {
pub tcx: TyCtxt<'tcx>,
pub op: OP,
}
impl<'tcx, OP> TypeVisitor<'tcx> for ConstrainOpaqueTypeRegionVisitor<'tcx, OP>