From 356ce96fe1fa630e660381448ce9ecb8defd3008 Mon Sep 17 00:00:00 2001 From: Ellen Date: Wed, 3 Mar 2021 10:04:49 +0000 Subject: [PATCH] Remove extraneous return statement --- .../rustc_trait_selection/src/traits/const_evaluatable.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs index 7e0c74c8d2b1..49575f2116f9 100644 --- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs +++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs @@ -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");