about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/const_eval
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-07-27 06:04:13 +0200
committerGitHub <noreply@github.com>2023-07-27 06:04:13 +0200
commitfa21a8c6f87f2fb4ecf48282c9c8b3a341ea9985 (patch)
treeb2b374dc31844eec9185cd25d9b88500ff090f9c /compiler/rustc_const_eval/src/const_eval
parent14669cbb9a36df04f1aa254cd7b363b78195a3c5 (diff)
parentc64ef5e070ee7ae7fb73de2bec06fb7498a9af83 (diff)
downloadrust-fa21a8c6f87f2fb4ecf48282c9c8b3a341ea9985.tar.gz
rust-fa21a8c6f87f2fb4ecf48282c9c8b3a341ea9985.zip
Rollup merge of #114075 - matthiaskrgr:fmt_args_rustc_3, r=wesleywiser
inline format!() args from rustc_codegen_llvm to the end (4)

r? `@WaffleLapkin`
Diffstat (limited to 'compiler/rustc_const_eval/src/const_eval')
-rw-r--r--compiler/rustc_const_eval/src/const_eval/eval_queries.rs2
-rw-r--r--compiler/rustc_const_eval/src/const_eval/valtrees.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs
index 55d719d2703..c8e8a371105 100644
--- a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs
+++ b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs
@@ -52,7 +52,7 @@ fn eval_body_using_ecx<'mir, 'tcx>(
     trace!(
         "eval_body_using_ecx: pushing stack frame for global: {}{}",
         with_no_trimmed_paths!(ecx.tcx.def_path_str(cid.instance.def_id())),
-        cid.promoted.map_or_else(String::new, |p| format!("::promoted[{:?}]", p))
+        cid.promoted.map_or_else(String::new, |p| format!("::promoted[{p:?}]"))
     );
 
     ecx.push_stack_frame(
diff --git a/compiler/rustc_const_eval/src/const_eval/valtrees.rs b/compiler/rustc_const_eval/src/const_eval/valtrees.rs
index 744dd114ca7..7c1dbddfc26 100644
--- a/compiler/rustc_const_eval/src/const_eval/valtrees.rs
+++ b/compiler/rustc_const_eval/src/const_eval/valtrees.rs
@@ -55,7 +55,7 @@ fn slice_branches<'tcx>(
     place: &MPlaceTy<'tcx>,
     num_nodes: &mut usize,
 ) -> ValTreeCreationResult<'tcx> {
-    let n = place.len(ecx).unwrap_or_else(|_| panic!("expected to use len of place {:?}", place));
+    let n = place.len(ecx).unwrap_or_else(|_| panic!("expected to use len of place {place:?}"));
 
     let mut elems = Vec::with_capacity(n as usize);
     for i in 0..n {