Skip to content

Commit 2381546

Browse files
committedJul 30, 2023
inline format!() args up to and including rustc_middle
1 parent 2e0136a commit 2381546

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+378
-437
lines changed
 

‎compiler/rustc/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn set_windows_exe_options() {
1818
let mut manifest = env::current_dir().unwrap();
1919
manifest.push(WINDOWS_MANIFEST_FILE);
2020

21-
println!("cargo:rerun-if-changed={}", WINDOWS_MANIFEST_FILE);
21+
println!("cargo:rerun-if-changed={WINDOWS_MANIFEST_FILE}");
2222
// Embed the Windows application manifest file.
2323
println!("cargo:rustc-link-arg-bin=rustc-main=/MANIFEST:EMBED");
2424
println!("cargo:rustc-link-arg-bin=rustc-main=/MANIFESTINPUT:{}", manifest.to_str().unwrap());

‎compiler/rustc_abi/src/layout.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ pub trait LayoutCalculator {
260260
}
261261
_ => assert!(
262262
start == Bound::Unbounded && end == Bound::Unbounded,
263-
"nonscalar layout for layout_scalar_valid_range type: {:#?}",
264-
st,
263+
"nonscalar layout for layout_scalar_valid_range type: {st:#?}",
265264
),
266265
}
267266

@@ -463,7 +462,7 @@ pub trait LayoutCalculator {
463462
min = 0;
464463
max = 0;
465464
}
466-
assert!(min <= max, "discriminant range is {}...{}", min, max);
465+
assert!(min <= max, "discriminant range is {min}...{max}");
467466
let (min_ity, signed) = discr_range_of_repr(min, max); //Integer::repr_discr(tcx, ty, &repr, min, max);
468467

469468
let mut align = dl.aggregate_align;
@@ -537,8 +536,7 @@ pub trait LayoutCalculator {
537536
// space necessary to represent would have to be discarded (or layout is wrong
538537
// on thinking it needs 16 bits)
539538
panic!(
540-
"layout decided on a larger discriminant type ({:?}) than typeck ({:?})",
541-
min_ity, typeck_ity
539+
"layout decided on a larger discriminant type ({min_ity:?}) than typeck ({typeck_ity:?})"
542540
);
543541
// However, it is fine to make discr type however large (as an optimisation)
544542
// after this point – we’ll just truncate the value we load in codegen.

0 commit comments

Comments
 (0)
Please sign in to comment.