Remove unused enum variant
This commit is contained in:
parent
b02f2982e7
commit
2431540b62
@ -386,21 +386,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||||||
|
|
||||||
self.report_placeholder_failure(sup_origin, sub_r, sup_r).emit();
|
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 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||||||
RegionResolutionError::GenericBoundFailure(..) => true,
|
RegionResolutionError::GenericBoundFailure(..) => true,
|
||||||
RegionResolutionError::ConcreteFailure(..)
|
RegionResolutionError::ConcreteFailure(..)
|
||||||
| RegionResolutionError::SubSupConflict(..)
|
| RegionResolutionError::SubSupConflict(..)
|
||||||
| RegionResolutionError::UpperBoundUniverseConflict(..)
|
| RegionResolutionError::UpperBoundUniverseConflict(..) => false,
|
||||||
| RegionResolutionError::MemberConstraintFailure { .. } => false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut errors = if errors.iter().all(|e| is_bound_failure(e)) {
|
let mut errors = if errors.iter().all(|e| is_bound_failure(e)) {
|
||||||
@ -454,7 +438,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||||||
RegionResolutionError::GenericBoundFailure(ref sro, _, _) => sro.span(),
|
RegionResolutionError::GenericBoundFailure(ref sro, _, _) => sro.span(),
|
||||||
RegionResolutionError::SubSupConflict(_, ref rvo, _, _, _, _) => rvo.span(),
|
RegionResolutionError::SubSupConflict(_, ref rvo, _, _, _, _) => rvo.span(),
|
||||||
RegionResolutionError::UpperBoundUniverseConflict(_, ref rvo, _, _, _) => rvo.span(),
|
RegionResolutionError::UpperBoundUniverseConflict(_, ref rvo, _, _, _) => rvo.span(),
|
||||||
RegionResolutionError::MemberConstraintFailure { span, .. } => span,
|
|
||||||
});
|
});
|
||||||
errors
|
errors
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ use rustc_middle::ty::{self, Ty, TyCtxt};
|
|||||||
use rustc_middle::ty::{ReEarlyBound, ReEmpty, ReErased, ReFree, ReStatic};
|
use rustc_middle::ty::{ReEarlyBound, ReEmpty, ReErased, ReFree, ReStatic};
|
||||||
use rustc_middle::ty::{ReLateBound, RePlaceholder, ReVar};
|
use rustc_middle::ty::{ReLateBound, RePlaceholder, ReVar};
|
||||||
use rustc_middle::ty::{Region, RegionVid};
|
use rustc_middle::ty::{Region, RegionVid};
|
||||||
use rustc_span::Span;
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
/// This function performs lexical region resolution given a complete
|
/// This function performs lexical region resolution given a complete
|
||||||
@ -108,11 +107,6 @@ pub enum RegionResolutionError<'tcx> {
|
|||||||
SubregionOrigin<'tcx>, // cause of the constraint
|
SubregionOrigin<'tcx>, // cause of the constraint
|
||||||
Region<'tcx>, // the placeholder `'b`
|
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> {
|
struct RegionAndOrigin<'tcx> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user