Remove unused enum variant
This commit is contained in:
parent
b02f2982e7
commit
2431540b62
@ -386,21 +386,6 @@ pub fn report_region_errors(&self, errors: &Vec<RegionResolutionError<'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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -438,8 +423,7 @@ fn process_errors(
|
||||
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)) {
|
||||
@ -454,7 +438,6 @@ fn process_errors(
|
||||
RegionResolutionError::GenericBoundFailure(ref sro, _, _) => sro.span(),
|
||||
RegionResolutionError::SubSupConflict(_, ref rvo, _, _, _, _) => rvo.span(),
|
||||
RegionResolutionError::UpperBoundUniverseConflict(_, ref rvo, _, _, _) => rvo.span(),
|
||||
RegionResolutionError::MemberConstraintFailure { span, .. } => span,
|
||||
});
|
||||
errors
|
||||
}
|
||||
|
@ -19,7 +19,6 @@
|
||||
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
|
||||
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user