From 33284ec099299a4c9b587a196ade88773cb1c430 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 21 Sep 2022 15:24:06 +0200 Subject: [PATCH 1/2] remove unnecessary to_string --- src/machine.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine.rs b/src/machine.rs index f11771911fa08..dcfb998c5645d 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -464,7 +464,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> { clock: Clock::new(config.isolated_op == IsolatedOp::Allow), #[cfg(unix)] external_so_lib: config.external_so_file.as_ref().map(|lib_file_path| { - let target_triple = &layout_cx.tcx.sess.opts.target_triple.to_string(); + let target_triple = layout_cx.tcx.sess.opts.target_triple.triple(); // Check if host target == the session target. if env!("TARGET") != target_triple { panic!( From c672c35ad63eba8626d850eed185a8d45444a857 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 21 Sep 2022 15:25:30 +0200 Subject: [PATCH 2/2] format > to_string --- src/shims/intrinsics/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shims/intrinsics/mod.rs b/src/shims/intrinsics/mod.rs index b85c799e2da66..e0985ace5be7d 100644 --- a/src/shims/intrinsics/mod.rs +++ b/src/shims/intrinsics/mod.rs @@ -365,7 +365,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { "breakpoint" => { let [] = check_arg_count(args)?; // normally this would raise a SIGTRAP, which aborts if no debugger is connected - throw_machine_stop!(TerminationInfo::Abort("Trace/breakpoint trap".to_string())) + throw_machine_stop!(TerminationInfo::Abort(format!("Trace/breakpoint trap"))) } name => throw_unsup_format!("unimplemented intrinsic: `{name}`"),