@@ -50,8 +50,8 @@ impl<T: MayLeak> MayLeak for MemoryKind<T> {
50
50
impl < T : fmt:: Display > fmt:: Display for MemoryKind < T > {
51
51
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
52
52
match self {
53
- MemoryKind :: Stack => write ! ( f , "stack variable" ) ,
54
- MemoryKind :: CallerLocation => write ! ( f , "caller location" ) ,
53
+ MemoryKind :: Stack => f . write_str ( "stack variable" ) ,
54
+ MemoryKind :: CallerLocation => f . write_str ( "caller location" ) ,
55
55
MemoryKind :: Machine ( m) => write ! ( f, "{}" , m) ,
56
56
}
57
57
}
@@ -893,7 +893,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> std::fmt::Debug for DumpAllocs<'a,
893
893
// global alloc
894
894
match self . ecx . tcx . try_get_global_alloc ( id) {
895
895
Some ( GlobalAlloc :: Memory ( alloc) ) => {
896
- write ! ( fmt, " (unchanged global, " ) ?;
896
+ fmt. write_str ( " (unchanged global, " ) ?;
897
897
write_allocation_track_relocs (
898
898
& mut * fmt,
899
899
* self . ecx . tcx ,
@@ -914,7 +914,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> std::fmt::Debug for DumpAllocs<'a,
914
914
write ! ( fmt, " (static: {})" , self . ecx. tcx. def_path_str( did) ) ?;
915
915
}
916
916
None => {
917
- write ! ( fmt, " (deallocated)" ) ?;
917
+ fmt. write_str ( " (deallocated)" ) ?;
918
918
}
919
919
}
920
920
}
0 commit comments