Conform names
This commit is contained in:
parent
852f915e5f
commit
62cb74af3c
4 changed files with 6 additions and 6 deletions
|
|
@ -372,7 +372,7 @@ for ::middle::const_val::ErrKind<'gcx> {
|
|||
MiscCatchAll |
|
||||
IndexOpFeatureGated |
|
||||
TypeckError |
|
||||
MatchCheckError => {
|
||||
CheckMatchError => {
|
||||
// nothing to do
|
||||
}
|
||||
UnimplementedConstVal(s) => {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ pub enum ErrKind<'tcx> {
|
|||
ErroneousReferencedConstant(Box<ConstEvalErr<'tcx>>),
|
||||
|
||||
TypeckError,
|
||||
MatchCheckError,
|
||||
CheckMatchError,
|
||||
}
|
||||
|
||||
impl<'tcx> From<ConstMathErr> for ErrKind<'tcx> {
|
||||
|
|
@ -169,7 +169,7 @@ impl<'a, 'gcx, 'tcx> ConstEvalErr<'tcx> {
|
|||
ErroneousReferencedConstant(_) => simple!("could not evaluate referenced constant"),
|
||||
|
||||
TypeckError => simple!("type-checking failed"),
|
||||
MatchCheckError => simple!("match-checking failed"),
|
||||
CheckMatchError => simple!("match-checking failed"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ impl<'a, 'gcx, 'tcx> ConstEvalErr<'tcx> {
|
|||
primary_kind: &str)
|
||||
{
|
||||
match self.kind {
|
||||
ErrKind::TypeckError | ErrKind::MatchCheckError => return,
|
||||
ErrKind::TypeckError | ErrKind::CheckMatchError => return,
|
||||
_ => {}
|
||||
}
|
||||
self.struct_error(tcx, primary_span, primary_kind).emit();
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ impl<'a, 'tcx> Lift<'tcx> for const_val::ErrKind<'a> {
|
|||
}
|
||||
|
||||
TypeckError => TypeckError,
|
||||
MatchCheckError => MatchCheckError,
|
||||
CheckMatchError => CheckMatchError,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -703,7 +703,7 @@ pub(crate) fn const_eval<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
|||
if tcx.check_match(def_id).is_err() {
|
||||
return Err(ConstEvalErr {
|
||||
span: tcx.def_span(key.value.0),
|
||||
kind: MatchCheckError,
|
||||
kind: CheckMatchError,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue