1
Fork 0

Remove extraneous return statement

This commit is contained in:
Ellen 2021-03-03 10:04:49 +00:00
parent 342ec83629
commit 356ce96fe1

View file

@ -162,10 +162,10 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
debug!(?concrete, "is_const_evaluatable");
match concrete {
Err(ErrorHandled::TooGeneric) => {
return Err(match substs.has_infer_types_or_consts() {
Err(match substs.has_infer_types_or_consts() {
true => NotConstEvaluatable::MentionsInfer,
false => NotConstEvaluatable::MentionsParam,
});
})
}
Err(ErrorHandled::Linted) => {
infcx.tcx.sess.delay_span_bug(span, "constant in type had error reported as lint");