mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Auto merge of #2557 - RalfJung:triple-to-string, r=RalfJung
remove unnecessary to_string
This commit is contained in:
+1
-1
@@ -464,7 +464,7 @@ pub(crate) fn new(config: &MiriConfig, layout_cx: LayoutCx<'tcx, TyCtxt<'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!(
|
||||
|
||||
@@ -365,7 +365,7 @@ fn emulate_intrinsic_by_name(
|
||||
"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}`"),
|
||||
|
||||
Reference in New Issue
Block a user