Skip to content

Commit 8b4e661

Browse files
committed
Removed unrelated now changes
1 parent 48c5509 commit 8b4e661

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

src/helpers.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -675,26 +675,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
675675
)
676676
}
677677

678-
/// Helper function used inside the shims of foreign functions to assert that the target OS
679-
/// is one of `target_oses`. It panics showing a message with the `name` of the foreign function
680-
/// if this is not the case.
681-
fn assert_target_os_is_one_of(&self, target_oses: &[&str], name: &str) {
682-
assert!(
683-
target_oses.contains(&self.eval_context_ref().tcx.sess.target.os.as_ref()),
684-
"`{name}` is only available on the {} target OS's",
685-
target_oses
686-
.iter()
687-
.enumerate()
688-
.map(|(i, t)| {
689-
match i {
690-
0 => format!("`{t}`"),
691-
_ => format!(", `{t}`"),
692-
}
693-
})
694-
.collect::<String>()
695-
)
696-
}
697-
698678
/// Helper function used inside the shims of foreign functions to assert that the target OS
699679
/// is part of the UNIX family. It panics showing a message with the `name` of the foreign function
700680
/// if this is not the case.

src/shims/unix/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
276276

277277
fn linux_gettid(&mut self) -> InterpResult<'tcx, Scalar> {
278278
let this = self.eval_context_ref();
279-
this.assert_target_os_is_one_of(&["linux", "android"], "gettid");
279+
this.assert_target_os("linux", "gettid");
280280

281281
let index = this.machine.threads.active_thread().to_u32();
282282

0 commit comments

Comments
 (0)