diff options
| author | bors <bors@rust-lang.org> | 2022-09-21 13:26:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-21 13:26:05 +0000 |
| commit | 75dd959a3a40eb5b4574f8d2e23aa6efbeb33573 (patch) | |
| tree | c4332cfe34d949c0c279a19c5c7ccc52e71a73fb | |
| parent | 351afbbe1c1998b051c1ba52d76f24d51a50eb46 (diff) | |
| parent | c672c35ad63eba8626d850eed185a8d45444a857 (diff) | |
| download | rust-75dd959a3a40eb5b4574f8d2e23aa6efbeb33573.tar.gz rust-75dd959a3a40eb5b4574f8d2e23aa6efbeb33573.zip | |
Auto merge of #2557 - RalfJung:triple-to-string, r=RalfJung
remove unnecessary to_string
| -rw-r--r-- | src/machine.rs | 2 | ||||
| -rw-r--r-- | src/shims/intrinsics/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/machine.rs b/src/machine.rs index f11771911fa..dcfb998c564 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!( diff --git a/src/shims/intrinsics/mod.rs b/src/shims/intrinsics/mod.rs index b85c799e2da..e0985ace5be 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}`"), |
