Skip to content

Commit 57e190c

Browse files
committed
Address review comments
1 parent 6f8fe4e commit 57e190c

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

src/librustc/ich/impls_ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ for ::mir::interpret::EvalErrorKind<'gcx, O> {
570570
ReadFromReturnPointer |
571571
UnimplementedTraitSelection |
572572
TypeckError |
573-
ResolutionFailed |
573+
TooGeneric |
574574
CheckMatchError |
575575
DerefFunctionPointer |
576576
ExecuteMemory |

src/librustc/middle/const_val.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<'a, 'gcx, 'tcx> ConstEvalErr<'tcx> {
101101
) -> Option<DiagnosticBuilder<'tcx>> {
102102
match self.data.0.kind {
103103
::mir::interpret::EvalErrorKind::TypeckError |
104-
::mir::interpret::EvalErrorKind::ResolutionFailed |
104+
::mir::interpret::EvalErrorKind::TooGeneric |
105105
::mir::interpret::EvalErrorKind::CheckMatchError |
106106
::mir::interpret::EvalErrorKind::Layout(_) => return None,
107107
::mir::interpret::EvalErrorKind::ReferencedConstant(ref inner) => {

src/librustc/mir/interpret/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ pub enum EvalErrorKind<'tcx, O> {
151151
/// Abort in case type errors are reached
152152
TypeckError,
153153
/// Resolution can fail if we are in a too generic context
154-
ResolutionFailed,
154+
TooGeneric,
155155
CheckMatchError,
156156
/// Cannot compute this constant because it depends on another one
157157
/// which already produced an error
@@ -271,7 +271,7 @@ impl<'tcx, O> EvalErrorKind<'tcx, O> {
271271
"there were unresolved type arguments during trait selection",
272272
TypeckError =>
273273
"encountered constants with type errors, stopping evaluation",
274-
ResolutionFailed =>
274+
TooGeneric =>
275275
"encountered overly generic constant",
276276
CheckMatchError =>
277277
"match checking failed",

src/librustc/traits/fulfill.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,11 +499,11 @@ impl<'a, 'b, 'gcx, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'b, 'gcx,
499499
CodeSelectionError(ConstEvalFailure(err)))
500500
}
501501
} else {
502-
let err = EvalErrorKind::ResolutionFailed.into();
502+
let err = EvalErrorKind::TooGeneric.into();
503503
ProcessResult::Error(
504504
CodeSelectionError(ConstEvalFailure(ConstEvalErr {
505505
span: obligation.cause.span,
506-
data: (err, Vec::new()).into(),
506+
data: (err, vec![]).into(),
507507
}))
508508
)
509509
}

src/librustc/ty/structural_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ impl<'a, 'tcx, O: Lift<'tcx>> Lift<'tcx> for interpret::EvalErrorKind<'a, O> {
577577
PathNotFound(ref v) => PathNotFound(v.clone()),
578578
UnimplementedTraitSelection => UnimplementedTraitSelection,
579579
TypeckError => TypeckError,
580-
ResolutionFailed => ResolutionFailed,
580+
TooGeneric => TooGeneric,
581581
CheckMatchError => CheckMatchError,
582582
ReferencedConstant(ref err) => ReferencedConstant(tcx.lift(err)?),
583583
OverflowNeg => OverflowNeg,

src/librustc_mir/interpret/eval_context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M
280280
self.param_env,
281281
def_id,
282282
substs,
283-
).ok_or_else(|| EvalErrorKind::ResolutionFailed.into())
283+
).ok_or_else(|| EvalErrorKind::TooGeneric.into())
284284
}
285285

286286
pub(super) fn type_is_sized(&self, ty: Ty<'tcx>) -> bool {
@@ -739,7 +739,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M
739739
self.param_env,
740740
def_id,
741741
substs,
742-
).ok_or_else(|| EvalErrorKind::ResolutionFailed.into());
742+
).ok_or_else(|| EvalErrorKind::TooGeneric.into());
743743
let fn_ptr = self.memory.create_fn_alloc(instance?);
744744
let valty = ValTy {
745745
value: Value::Scalar(fn_ptr.into()),

0 commit comments

Comments
 (0)