mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
Fix tidy err and review
This commit is contained in:
parent
356ce96fe1
commit
8e353bb8ea
@ -161,12 +161,10 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
|
||||
|
||||
debug!(?concrete, "is_const_evaluatable");
|
||||
match concrete {
|
||||
Err(ErrorHandled::TooGeneric) => {
|
||||
Err(match substs.has_infer_types_or_consts() {
|
||||
true => NotConstEvaluatable::MentionsInfer,
|
||||
false => NotConstEvaluatable::MentionsParam,
|
||||
})
|
||||
}
|
||||
Err(ErrorHandled::TooGeneric) => 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");
|
||||
Err(NotConstEvaluatable::Error(ErrorReported))
|
||||
|
@ -506,16 +506,12 @@ impl<'a, 'b, 'tcx> FulfillProcessor<'a, 'b, 'tcx> {
|
||||
);
|
||||
ProcessResult::Unchanged
|
||||
}
|
||||
Err(NotConstEvaluatable::MentionsParam) => ProcessResult::Error(
|
||||
CodeSelectionError(SelectionError::NotConstEvaluatable(
|
||||
NotConstEvaluatable::MentionsParam,
|
||||
)),
|
||||
),
|
||||
Err(NotConstEvaluatable::Error(e)) => {
|
||||
ProcessResult::Error(CodeSelectionError(
|
||||
SelectionError::NotConstEvaluatable(NotConstEvaluatable::Error(e)),
|
||||
))
|
||||
}
|
||||
Err(
|
||||
e @ NotConstEvaluatable::MentionsParam
|
||||
| e @ NotConstEvaluatable::Error(_),
|
||||
) => ProcessResult::Error(CodeSelectionError(
|
||||
SelectionError::NotConstEvaluatable(e),
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user