inline format!() args up to and including rustc_middle

This commit is contained in:
Matthias Krüger
2023-07-25 22:00:13 +02:00
parent 2e0136a131
commit 23815467a2
87 changed files with 378 additions and 437 deletions

View File

@@ -29,7 +29,7 @@ fn opt_span_bug_fmt<S: Into<MultiSpan>>(
location: &Location<'_>,
) -> ! {
tls::with_opt(move |tcx| {
let msg = format!("{}: {}", location, args);
let msg = format!("{location}: {args}");
match (tcx, span) {
(Some(tcx), Some(span)) => tcx.sess.diagnostic().span_bug(span, msg),
(Some(tcx), None) => tcx.sess.diagnostic().bug(msg),