Rollup merge of #103726 - TaKO8Ki:avoid-&str-to-string-conversions, r=compiler-errors
Avoid unnecessary `&str` to `String` conversions
This commit is contained in:
commit
2bff9e2193
3 changed files with 8 additions and 11 deletions
|
@ -192,12 +192,12 @@ pub fn is_const_evaluatable<'tcx>(
|
|||
}
|
||||
let concrete = infcx.const_eval_resolve(param_env, uv, Some(span));
|
||||
match concrete {
|
||||
Err(ErrorHandled::TooGeneric) => {
|
||||
Err(NotConstEvaluatable::Error(infcx.tcx.sess.delay_span_bug(
|
||||
span,
|
||||
format!("Missing value for constant, but no error reported?"),
|
||||
)))
|
||||
}
|
||||
Err(ErrorHandled::TooGeneric) => Err(NotConstEvaluatable::Error(
|
||||
infcx
|
||||
.tcx
|
||||
.sess
|
||||
.delay_span_bug(span, "Missing value for constant, but no error reported?"),
|
||||
)),
|
||||
Err(ErrorHandled::Linted) => {
|
||||
let reported = infcx
|
||||
.tcx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue