Skip to content

Commit

Permalink
Auto merge of #134096 - fmease:rollup-0asgoo8, r=fmease
Browse files Browse the repository at this point in the history
Rollup of 9 pull requests

Successful merges:

 - #133996 (Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs`)
 - #134012 (Grammar fixes)
 - #134032 (docs: better examples for `std::ops::ControlFlow`)
 - #134040 (bootstrap: print{ln}! -> eprint{ln}! (take 2))
 - #134043 (Add test to check unicode identifier version)
 - #134053 (rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 10))
 - #134055 (interpret: clean up deduplicating allocation functions)
 - #134073 (dataflow_const_prop: do not eval a ptr address in SwitchInt)
 - #134084 (Fix typo in RFC mention 3598 -> 3593)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Dec 10, 2024
2 parents 0cb2cd5 + 6739bad commit fd001c4
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 104 deletions.
10 changes: 1 addition & 9 deletions src/shims/backtrace.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use rustc_abi::{ExternAbi, Size};
use rustc_ast::ast::Mutability;
use rustc_middle::ty::layout::LayoutOf as _;
use rustc_middle::ty::{self, Instance, Ty};
use rustc_span::{BytePos, Loc, Symbol, hygiene};
Expand Down Expand Up @@ -179,14 +178,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {

match flags {
0 => {
// These are "mutable" allocations as we consider them to be owned by the callee.
let name_alloc =
this.allocate_str(&name, MiriMemoryKind::Rust.into(), Mutability::Mut)?;
let filename_alloc =
this.allocate_str(&filename, MiriMemoryKind::Rust.into(), Mutability::Mut)?;

this.write_immediate(name_alloc.to_ref(this), &this.project_field(dest, 0)?)?;
this.write_immediate(filename_alloc.to_ref(this), &this.project_field(dest, 1)?)?;
throw_unsup_format!("miri_resolve_frame: v0 is not supported any more");
}
1 => {
this.write_scalar(
Expand Down
5 changes: 2 additions & 3 deletions src/shims/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
//! metadata we remembered when pushing said frame.
use rustc_abi::ExternAbi;
use rustc_ast::Mutability;
use rustc_middle::{mir, ty};
use rustc_target::spec::PanicStrategy;

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

// First arg: message.
let msg = this.allocate_str(msg, MiriMemoryKind::Machine.into(), Mutability::Not)?;
let msg = this.allocate_str_dedup(msg)?;

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

// First arg: message.
let msg = this.allocate_str(msg, MiriMemoryKind::Machine.into(), Mutability::Not)?;
let msg = this.allocate_str_dedup(msg)?;

// Call the lang item.
let panic = this.tcx.lang_items().panic_nounwind().unwrap();
Expand Down
69 changes: 0 additions & 69 deletions tests/pass/backtrace/backtrace-api-v0.rs

This file was deleted.

18 changes: 0 additions & 18 deletions tests/pass/backtrace/backtrace-api-v0.stderr

This file was deleted.

5 changes: 0 additions & 5 deletions tests/pass/backtrace/backtrace-api-v0.stdout

This file was deleted.

0 comments on commit fd001c4

Please sign in to comment.