Skip to content

Commit 2431540

Browse files
committed
Remove unused enum variant
1 parent b02f298 commit 2431540

File tree

2 files changed

+1
-24
lines changed
  • compiler/rustc_infer/src/infer

2 files changed

+1
-24
lines changed

compiler/rustc_infer/src/infer/error_reporting/mod.rs

+1-18
Original file line numberDiff line numberDiff line change
@@ -386,21 +386,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
386386

387387
self.report_placeholder_failure(sup_origin, sub_r, sup_r).emit();
388388
}
389-
390-
RegionResolutionError::MemberConstraintFailure {
391-
hidden_ty,
392-
member_region,
393-
span,
394-
} => {
395-
let hidden_ty = self.resolve_vars_if_possible(hidden_ty);
396-
unexpected_hidden_region_diagnostic(
397-
self.tcx,
398-
span,
399-
hidden_ty,
400-
member_region,
401-
)
402-
.emit();
403-
}
404389
}
405390
}
406391
}
@@ -438,8 +423,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
438423
RegionResolutionError::GenericBoundFailure(..) => true,
439424
RegionResolutionError::ConcreteFailure(..)
440425
| RegionResolutionError::SubSupConflict(..)
441-
| RegionResolutionError::UpperBoundUniverseConflict(..)
442-
| RegionResolutionError::MemberConstraintFailure { .. } => false,
426+
| RegionResolutionError::UpperBoundUniverseConflict(..) => false,
443427
};
444428

445429
let mut errors = if errors.iter().all(|e| is_bound_failure(e)) {
@@ -454,7 +438,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
454438
RegionResolutionError::GenericBoundFailure(ref sro, _, _) => sro.span(),
455439
RegionResolutionError::SubSupConflict(_, ref rvo, _, _, _, _) => rvo.span(),
456440
RegionResolutionError::UpperBoundUniverseConflict(_, ref rvo, _, _, _) => rvo.span(),
457-
RegionResolutionError::MemberConstraintFailure { span, .. } => span,
458441
});
459442
errors
460443
}

compiler/rustc_infer/src/infer/lexical_region_resolve/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use rustc_middle::ty::{self, Ty, TyCtxt};
1919
use rustc_middle::ty::{ReEarlyBound, ReEmpty, ReErased, ReFree, ReStatic};
2020
use rustc_middle::ty::{ReLateBound, RePlaceholder, ReVar};
2121
use rustc_middle::ty::{Region, RegionVid};
22-
use rustc_span::Span;
2322
use std::fmt;
2423

2524
/// This function performs lexical region resolution given a complete
@@ -108,11 +107,6 @@ pub enum RegionResolutionError<'tcx> {
108107
SubregionOrigin<'tcx>, // cause of the constraint
109108
Region<'tcx>, // the placeholder `'b`
110109
),
111-
112-
/// Indicates a failure of a `MemberConstraint`. These arise during
113-
/// impl trait processing explicitly -- basically, the impl trait's hidden type
114-
/// included some region that it was not supposed to.
115-
MemberConstraintFailure { span: Span, hidden_ty: Ty<'tcx>, member_region: Region<'tcx> },
116110
}
117111

118112
struct RegionAndOrigin<'tcx> {

0 commit comments

Comments
 (0)