Skip to content

Commit

Permalink
Remove unused enum variant
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Oct 18, 2021
1 parent b02f298 commit 2431540
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
19 changes: 1 addition & 18 deletions compiler/rustc_infer/src/infer/error_reporting/mod.rs
Expand Up @@ -386,21 +386,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {

self.report_placeholder_failure(sup_origin, sub_r, sup_r).emit();
}

RegionResolutionError::MemberConstraintFailure {
hidden_ty,
member_region,
span,
} => {
let hidden_ty = self.resolve_vars_if_possible(hidden_ty);
unexpected_hidden_region_diagnostic(
self.tcx,
span,
hidden_ty,
member_region,
)
.emit();
}
}
}
}
Expand Down Expand Up @@ -438,8 +423,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
RegionResolutionError::GenericBoundFailure(..) => true,
RegionResolutionError::ConcreteFailure(..)
| RegionResolutionError::SubSupConflict(..)
| RegionResolutionError::UpperBoundUniverseConflict(..)
| RegionResolutionError::MemberConstraintFailure { .. } => false,
| RegionResolutionError::UpperBoundUniverseConflict(..) => false,
};

let mut errors = if errors.iter().all(|e| is_bound_failure(e)) {
Expand All @@ -454,7 +438,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
RegionResolutionError::GenericBoundFailure(ref sro, _, _) => sro.span(),
RegionResolutionError::SubSupConflict(_, ref rvo, _, _, _, _) => rvo.span(),
RegionResolutionError::UpperBoundUniverseConflict(_, ref rvo, _, _, _) => rvo.span(),
RegionResolutionError::MemberConstraintFailure { span, .. } => span,
});
errors
}
Expand Down
6 changes: 0 additions & 6 deletions compiler/rustc_infer/src/infer/lexical_region_resolve/mod.rs
Expand Up @@ -19,7 +19,6 @@ use rustc_middle::ty::{self, Ty, TyCtxt};
use rustc_middle::ty::{ReEarlyBound, ReEmpty, ReErased, ReFree, ReStatic};
use rustc_middle::ty::{ReLateBound, RePlaceholder, ReVar};
use rustc_middle::ty::{Region, RegionVid};
use rustc_span::Span;
use std::fmt;

/// This function performs lexical region resolution given a complete
Expand Down Expand Up @@ -108,11 +107,6 @@ pub enum RegionResolutionError<'tcx> {
SubregionOrigin<'tcx>, // cause of the constraint
Region<'tcx>, // the placeholder `'b`
),

/// Indicates a failure of a `MemberConstraint`. These arise during
/// impl trait processing explicitly -- basically, the impl trait's hidden type
/// included some region that it was not supposed to.
MemberConstraintFailure { span: Span, hidden_ty: Ty<'tcx>, member_region: Region<'tcx> },
}

struct RegionAndOrigin<'tcx> {
Expand Down

0 comments on commit 2431540

Please sign in to comment.