From 98f8156ef4ce8c227d8837faf03f08c82f5b5cf6 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 12 Dec 2024 12:27:01 +0100 Subject: [PATCH] fix use of this.allocate_bytes --- src/shims/time.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/shims/time.rs b/src/shims/time.rs index 11557d51c8..72d98bc1c4 100644 --- a/src/shims/time.rs +++ b/src/shims/time.rs @@ -5,8 +5,6 @@ use std::time::{Duration, SystemTime}; use chrono::{DateTime, Datelike, Offset, Timelike, Utc}; use chrono_tz::Tz; -use rustc_abi::Align; -use rustc_ast::ast::Mutability; use crate::*; @@ -202,12 +200,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { tm_zone.push('\0'); // Deduplicate and allocate the string. - let tm_zone_ptr = this.allocate_bytes( - tm_zone.as_bytes(), - Align::ONE, - MiriMemoryKind::Machine.into(), - Mutability::Not, - )?; + let tm_zone_ptr = this.allocate_bytes_dedup(tm_zone.as_bytes())?; // Write the timezone pointer and offset into the result structure. this.write_pointer(tm_zone_ptr, &this.project_field_named(&result, "tm_zone")?)?;