Revert "Better errors for implied static bound"

This reverts commit c75817b0a7.
This commit is contained in:
Jack Huey
2022-09-16 09:47:07 -04:00
parent bba514b7b4
commit 92b759f517
22 changed files with 98 additions and 330 deletions

View File

@@ -10,7 +10,6 @@ mod structural_impls;
pub mod util;
use crate::infer::canonical::Canonical;
use crate::mir::ConstraintCategory;
use crate::ty::abstract_const::NotConstEvaluatable;
use crate::ty::subst::SubstsRef;
use crate::ty::{self, AdtKind, Ty, TyCtxt};
@@ -184,16 +183,6 @@ impl<'tcx> ObligationCause<'tcx> {
variant(DerivedObligationCause { parent_trait_pred, parent_code: self.code }).into();
self
}
pub fn to_constraint_category(&self) -> ConstraintCategory<'tcx> {
match self.code() {
MatchImpl(cause, _) => cause.to_constraint_category(),
AscribeUserTypeProvePredicate(predicate_span) => {
ConstraintCategory::Predicate(*predicate_span)
}
_ => ConstraintCategory::BoringNoLocation,
}
}
}
#[derive(Clone, Debug, PartialEq, Eq, Hash, Lift)]
@@ -429,8 +418,6 @@ pub enum ObligationCauseCode<'tcx> {
is_lit: bool,
output_ty: Option<Ty<'tcx>>,
},
AscribeUserTypeProvePredicate(Span),
}
/// The 'location' at which we try to perform HIR-based wf checking.