diff options
| author | Ralf Jung <post@ralfj.de> | 2024-12-12 12:27:01 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-12-12 12:27:01 +0100 |
| commit | 202098e049bfd0e505ad7f698ed281e58bcdfa58 (patch) | |
| tree | 64403448ea5ce8b96b79215ebd3b5c0490ff7d43 | |
| parent | f590fa92140b5cc375bd4bc16ca6e930c5bf9e33 (diff) | |
| download | rust-202098e049bfd0e505ad7f698ed281e58bcdfa58.tar.gz rust-202098e049bfd0e505ad7f698ed281e58bcdfa58.zip | |
fix use of this.allocate_bytes
| -rw-r--r-- | src/tools/miri/src/shims/time.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/tools/miri/src/shims/time.rs b/src/tools/miri/src/shims/time.rs index 11557d51c8e..72d98bc1c48 100644 --- a/src/tools/miri/src/shims/time.rs +++ b/src/tools/miri/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")?)?; |
