Skip to content

Commit

Permalink
Auto merge of #2557 - RalfJung:triple-to-string, r=RalfJung
Browse files Browse the repository at this point in the history
remove unnecessary to_string
  • Loading branch information
bors committed Sep 21, 2022
2 parents 351afbb + c672c35 commit 75dd959
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down
2 changes: 1 addition & 1 deletion src/shims/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}`"),
Expand Down

0 comments on commit 75dd959

Please sign in to comment.