Skip to content

Commit ec037c6

Browse files
authored
Merge pull request #4092 from RalfJung/rustup
Rustup
2 parents ebaf27c + 98f8156 commit ec037c6

File tree

7 files changed

+5
-113
lines changed

7 files changed

+5
-113
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1b3fb316751227d30b1523ed0e3f00d83956d4d0
1+
903d2976fdb6ceeb65526b7555d8d1e6f8c02134

src/shims/backtrace.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use rustc_abi::{ExternAbi, Size};
2-
use rustc_ast::ast::Mutability;
32
use rustc_middle::ty::layout::LayoutOf as _;
43
use rustc_middle::ty::{self, Instance, Ty};
54
use rustc_span::{BytePos, Loc, Symbol, hygiene};
@@ -179,14 +178,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
179178

180179
match flags {
181180
0 => {
182-
// These are "mutable" allocations as we consider them to be owned by the callee.
183-
let name_alloc =
184-
this.allocate_str(&name, MiriMemoryKind::Rust.into(), Mutability::Mut)?;
185-
let filename_alloc =
186-
this.allocate_str(&filename, MiriMemoryKind::Rust.into(), Mutability::Mut)?;
187-
188-
this.write_immediate(name_alloc.to_ref(this), &this.project_field(dest, 0)?)?;
189-
this.write_immediate(filename_alloc.to_ref(this), &this.project_field(dest, 1)?)?;
181+
throw_unsup_format!("miri_resolve_frame: v0 is not supported any more");
190182
}
191183
1 => {
192184
this.write_scalar(

src/shims/panic.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
//! metadata we remembered when pushing said frame.
1313
1414
use rustc_abi::ExternAbi;
15-
use rustc_ast::Mutability;
1615
use rustc_middle::{mir, ty};
1716
use rustc_target::spec::PanicStrategy;
1817

@@ -161,7 +160,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
161160
let this = self.eval_context_mut();
162161

163162
// First arg: message.
164-
let msg = this.allocate_str(msg, MiriMemoryKind::Machine.into(), Mutability::Not)?;
163+
let msg = this.allocate_str_dedup(msg)?;
165164

166165
// Call the lang item.
167166
let panic = this.tcx.lang_items().panic_fn().unwrap();
@@ -180,7 +179,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
180179
let this = self.eval_context_mut();
181180

182181
// First arg: message.
183-
let msg = this.allocate_str(msg, MiriMemoryKind::Machine.into(), Mutability::Not)?;
182+
let msg = this.allocate_str_dedup(msg)?;
184183

185184
// Call the lang item.
186185
let panic = this.tcx.lang_items().panic_nounwind().unwrap();

src/shims/time.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ use std::time::{Duration, SystemTime};
55

66
use chrono::{DateTime, Datelike, Offset, Timelike, Utc};
77
use chrono_tz::Tz;
8-
use rustc_abi::Align;
9-
use rustc_ast::ast::Mutability;
108

119
use crate::*;
1210

@@ -202,12 +200,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
202200
tm_zone.push('\0');
203201

204202
// Deduplicate and allocate the string.
205-
let tm_zone_ptr = this.allocate_bytes(
206-
tm_zone.as_bytes(),
207-
Align::ONE,
208-
MiriMemoryKind::Machine.into(),
209-
Mutability::Not,
210-
)?;
203+
let tm_zone_ptr = this.allocate_bytes_dedup(tm_zone.as_bytes())?;
211204

212205
// Write the timezone pointer and offset into the result structure.
213206
this.write_pointer(tm_zone_ptr, &this.project_field_named(&result, "tm_zone")?)?;

tests/pass/backtrace/backtrace-api-v0.rs

Lines changed: 0 additions & 69 deletions
This file was deleted.

tests/pass/backtrace/backtrace-api-v0.stderr

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/pass/backtrace/backtrace-api-v0.stdout

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)