@@ -46,7 +46,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
4646 fn min_align ( & self , size : u64 , kind : MiriMemoryKind ) -> Align {
4747 let this = self . eval_context_ref ( ) ;
4848 // List taken from `libstd/sys_common/alloc.rs`.
49- let min_align = match this. tcx . sess . target . arch . as_str ( ) {
49+ let min_align = match this. tcx . sess . target . arch . as_ref ( ) {
5050 "x86" | "arm" | "mips" | "powerpc" | "powerpc64" | "asmjs" | "wasm32" => 8 ,
5151 "x86_64" | "aarch64" | "mips64" | "s390x" | "sparc64" => 16 ,
5252 arch => bug ! ( "Unsupported target architecture: {}" , arch) ,
@@ -695,7 +695,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
695695 }
696696
697697 // Platform-specific shims
698- _ => match this. tcx . sess . target . os . as_str ( ) {
698+ _ => match this. tcx . sess . target . os . as_ref ( ) {
699699 "linux" | "macos" => return shims:: posix:: foreign_items:: EvalContextExt :: emulate_foreign_item_by_name ( this, link_name, abi, args, dest, ret) ,
700700 "windows" => return shims:: windows:: foreign_items:: EvalContextExt :: emulate_foreign_item_by_name ( this, link_name, abi, args, dest, ret) ,
701701 target => throw_unsup_format ! ( "the target `{}` is not supported" , target) ,
0 commit comments