use &str / String literals instead of format!()

This commit is contained in:
Matthias Krüger
2022-12-18 16:17:46 +01:00
parent 35a99eef32
commit 3af7df91fc
19 changed files with 37 additions and 55 deletions

View File

@@ -138,10 +138,10 @@ pub fn is_const_evaluatable<'tcx>(
} else if uv.has_non_region_param() {
NotConstEvaluatable::MentionsParam
} else {
let guar = infcx.tcx.sess.delay_span_bug(
span,
format!("Missing value for constant, but no error reported?"),
);
let guar = infcx
.tcx
.sess
.delay_span_bug(span, "Missing value for constant, but no error reported?");
NotConstEvaluatable::Error(guar)
};