Commit Graph

8375 Commits

Author SHA1 Message Date
bors
2a9bacf618 Auto merge of #145177 - joboet:move-pal-thread, r=ibraheemdev
std: move `thread` into `sys`

Part of https://github.com/rust-lang/rust/issues/117276.
2025-09-11 22:31:43 +00:00
Connor Tsui
6354c51d2b update doc comment
Co-authored-by: Ralf Jung <post@ralfj.de>
2025-09-11 13:08:44 -04:00
Connor Tsui
18d0dcbc8e fix config for poison macro test
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-09-11 12:35:26 -04:00
Ralf Jung
092802640f rwlock tests: fix miri macos test regression 2025-09-11 10:04:32 +02:00
Martin Kröning
af5355cc91 Implement Socket::take_error for Hermit 2025-09-11 09:05:17 +02:00
Martin Kröning
9fe101b6ea Remove unused import from sys/pal/hermit/os.rs
This fixes

```
error: unused import: `str`
 --> library/std/src/sys/pal/hermit/os.rs:6:22
  |
6 | use crate::{fmt, io, str};
  |                      ^^^
  |
  = note: `-D unused-imports` implied by `-D warnings`
  = help: to override `-D warnings` add `#[allow(unused_imports)]`
```

This was caused by 845311a065.
2025-09-11 09:05:17 +02:00
Stuart Cook
c79c990df1 Rollup merge of #146379 - madsmtm:fix-platform_version-test, r=tgross35
Fix `compare_against_sw_vers` test

The `saturating_sub` doesn't actually perform its intended since the version numbers are signed integers (which I changed in a later revision of https://github.com/rust-lang/rust/pull/138944).

Fixes the issue described in https://github.com/rust-lang/rust/pull/138944#issuecomment-3270662876.

r? tgross35
2025-09-11 14:06:29 +10:00
Matthias Krüger
d061896a37 Rollup merge of #146322 - weiznich:fix/146087, r=joboet
Make Barrier RefUnwindSafe again

This commit manually implements `RefUnwindSafe` for `std::sync::Barrier` to fix rust-lang/rust#146087. This is a fix for a regression indroduced by e95db591a4
2025-09-10 20:29:07 +02:00
Matthias Krüger
e79630da0b Rollup merge of #145327 - joboet:net-addr-sgx-hack, r=tgross35
std: make address resolution weirdness local to SGX

Currently, the implementations of `TcpStream::connect` and its cousins take an `io::Result<&SocketAddr>` as argument, which is very weird, as most of them then `?`-try the result immediately to access the actual address. This weirdness is however necessitated by a peculiarity of the SGX networking implementation:

SGX doesn't support DNS resolution but rather accepts hostnames in the same place as socket addresses. So, to make e.g.
```rust
TcpStream::connect("example.com:80")`
```
work, the DNS lookup returns a special error (`NonIpSockAddr`) instead, which contains the hostname being looked up. When `.to_socket_addrs()` fails, the `each_addr` function used to select an address will pass the error to the inner `TcpStream::connect` implementation, which in SGX's case will inspect the error and try recover the hostname from it. If
that succeeds, it continues with the found hostname.

This is pretty obviously a terrible hack and leads to buggy code (for instance, when users use the result of `.to_socket_addrs()` in their own `ToSocketAddrs` implementation to select from a list of possible URLs, the only URL used will be that of the last item tried). Still, without changes to the SGX usercall ABI, it cannot be avoided.

Therefore, this PR aims to minimise the impact of that weirdness and remove it from all non-SGX platforms. The inner `TcpStream::connect`, et al. functions now receive the `ToSocketAddrs` type directly and call `each_addr` (which is moved to `sys::net::connection`) themselves. On SGX, the implementation uses a special `each_addr` which contains the whole pass-hostname-through-error hack.

As well as making the code cleaner, this also opens up the possibility of reusing newly created sockets even if a connection request fails – but I've left that for another PR.

CC `@raoulstrackx`
2025-09-10 20:29:04 +02:00
joboet
4c99219959 std: only test dlsym! on platforms where it is actually used
`dlsym` doesn't work for finding libc symbols on platforms like linux-musl, so the test will fail.
2025-09-10 15:34:38 +02:00
joboet
ad08577a50 std: move thread into sys 2025-09-10 15:26:17 +02:00
Georg Semmler
ef7b036458 Add suggestions 2025-09-10 07:55:03 +02:00
Mads Marquart
23edc4dd42 Fix compare_against_sw_vers test when a version part is 0 2025-09-09 19:43:50 +02:00
Matthias Krüger
542130f729 Rollup merge of #146366 - LorrensP-2158466:miri-gamma, r=RalfJung
add approx_delta to all gamma tests

f32::gamma tests are less precise in CI, so we increase the tolerance for these tests. See [#miri > Miri test-libstd Failure (2025-09) @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/269128-miri/topic/Miri.20test-libstd.20Failure.20.282025-09.29/near/538138742)

r? `@RalfJung`
2025-09-09 17:32:23 +02:00
Georg Semmler
30fd32eca5 Make the compile test use a const instead 2025-09-09 17:14:38 +02:00
Georg Semmler
20d02258fc Make Barrier RefUnwindSafe again
This commit manually implements `RefUnwindSafe` for
`std::sync::Barrier` to fix 146087. This is a fix for a regression
indroduced by e95db591a4
2025-09-09 17:13:38 +02:00
LorrensP-2158466
c4cbb54f3f add approx_delta to all gamma tests 2025-09-09 09:49:48 +02:00
Stuart Cook
8b9ea589fb Rollup merge of #146343 - madsmtm:fix-platform_version, r=tgross35
Weakly export `platform_version` symbols

The symbols `__isPlatformVersionAtLeast` and `__isOSVersionAtLeast`. This should allow linking both `compiler-rt` and `std`, which fixes https://github.com/rust-lang/rust/pull/138944#issuecomment-3266574582.

r? tgross35
CC ``@zmodem,`` could you please verify that this works for you?
2025-09-09 14:35:07 +10:00
Mads Marquart
fe6f8cc6f5 Weakly export platform_version symbols
The symbols __isPlatformVersionAtLeast and __isOSVersionAtLeast.

This allows the user to link both compiler_rt and std.
2025-09-08 20:10:43 +02:00
Mads Marquart
d51f0ea172 Reorder test to make failures clearer 2025-09-08 20:10:43 +02:00
joboet
4b15dd5a84 std: move thread into sys (rename only) 2025-09-08 17:02:25 +02:00
joboet
207a01e88f std: make address resolution weirdness local to SGX 2025-09-08 16:58:43 +02:00
Matthias Krüger
d1ab870a07 Rollup merge of #146299 - smirzaei:doc/improve-path-canonicalize-docs, r=jhpratt
docs(std): add error docs for path canonicalize

This PR adds the missing error documentation for both [Path.canonicalize](https://doc.rust-lang.org/std/path/struct.Path.html#method.canonicalize) and [PathBuf.canonicalize](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.canonicalize) methods. Since both methods are wappers around [fs::canonicalize](https://doc.rust-lang.org/std/fs/fn.canonicalize.html), the error doc is copied directly from that function.

This makes it faster to find what errors might arise when calling `path.canonicalize` or `path_buf.canonicalize` in the editor itself without needing to drill down to the  `fs::canonicalzie` docs.
2025-09-08 16:34:57 +02:00
Matthias Krüger
e4e4829579 Rollup merge of #146269 - weihanglo:solaris-flock, r=Mark-Simulacrum
feat(std): emulate flock for solaris via fcntl

Upstream Solaris flock emulation to libstd from cargo.

This is borrowed from
3b379fcc54/src/cargo/util/flock.rs (L502-L536) which was implemented by an Oracle employee.
The code has been in cargo since 2022-12.

Python's `fcntl.flock` emulates like this as well: c919d02ede/Modules/fcntlmodule.c (L337-L400)

We did the same thing in
0d0f4eac8b/compiler/rustc_data_structures/src/flock/unix.rs (L13-L39)

However, should we just always falls back to fcntl for all Unix, instead of "unsupported"?

try-job: `*-solaris`
2025-09-07 20:02:28 +02:00
Soroush Mirzaei
4b5d0e02ca docs(std): add error docs for path canonicalize 2025-09-07 11:17:59 -04:00
bors
f13ef0d75d Auto merge of #146216 - LorrensP-2158466:miri-float-nondet-foreign-items-take2, r=RalfJung
Miri: non-deterministic floating point operations in foreign_items

Take 2 of rust-lang/rust#143906. The last 2 commits are what changed compared to the original pr.

Verified the tests using (fish shell):
```fish
env MIRIFLAGS="-Zmiri-max-extra-rounding-error -Zmiri-many-seeds" ./x miri --no-fail-fast std core coretests  -- f32 f64
```

r? `@RalfJung`
2025-09-07 10:46:38 +00:00
Weihang Lo
01edb24d3c feat(std): emulate flock for solaris via fcntl
Upstream Solaris flock emulation to libstd from cargo.

This is borrowed from
3b379fcc54/src/cargo/util/flock.rs (L502-L536)
which was implemented by an Oracle employee.
The code has been in cargo since 2022-12.

Python's `fcntl.flock` emulates like this as well:
c919d02ede/Modules/fcntlmodule.c (L337-L400)

We did the same thing in
0d0f4eac8b/compiler/rustc_data_structures/src/flock/unix.rs (L13-L39)
2025-09-07 00:05:13 -04:00
LorrensP-2158466
e7e06aca38 Change stdlib float tests to account for miri nondet floats. 2025-09-06 21:45:17 +02:00
Trevor Gross
31d7cbc371 Rollup merge of #139524 - Berrysoft:cygwin-socket-ext, r=tgross35
Add socket extensions for cygwin

r? `@joboet`

* Abstract name uds addr
* quickack
* passcred
2025-09-06 14:39:04 -04:00
Berrysoft
26b1575722 Add socket extensions for cygwin 2025-09-06 20:23:37 +08:00
Trevor Gross
e2698f8c36 Rollup merge of #146257 - alexcrichton:update-wasi-crate, r=tgross35
std: Update `wasi` crate dependency

The recent work on the WASIp2 target being integrated into the standard library (rust-lang/rust#146207, rust-lang/rust#145944) ended up causing a bug in nightly on the target. This [has now been fixed](https://github.com/bytecodealliance/wasi-rs/pull/115) in the `wasi` crate so this commit pulls in the updated version to ensure bindings work correctly.
2025-09-05 20:10:01 -04:00
Alex Crichton
874dbd5d57 std: Update wasi crate dependency
The recent work on the WASIp2 target being integrated into the standard
library ended up causing a bug in nightly on the target. This has now
been fixed in the `wasi` crate so this commit pulls in the updated
version to ensure bindings work correctly.
2025-09-05 17:01:07 -07:00
León Orell Valerian Liehr
349fbba24f Rollup merge of #138944 - madsmtm:apple_os_version_check, r=tgross35
Add `__isPlatformVersionAtLeast` and `__isOSVersionAtLeast` symbols

## Motivation

When Objective-C code uses ```@available(...)`,`` Clang inserts a call to [`__isPlatformVersionAtLeast`](https://github.com/llvm/llvm-project/blob/llvmorg-20.1.0/compiler-rt/lib/builtins/os_version_check.c#L276) (`__isOSVersionAtLeast` in older Clang versions). These symbols not being available sometimes ends up causing linker errors. See the new test `tests/run-make/apple-c-available-links` for a minimal reproducer.

The workaround is to link `libclang_rt.osx.a`, see e.g. https://github.com/alexcrichton/curl-rust/issues/279. But that's very difficult for users to figure out (and the backreferences to that issue indicates that people are still running into this in their own projects every so often).

For another recent example, this is preventing `rustc` from using LLVM assertions on macOS, see https://github.com/rust-lang/rust/pull/62592#issuecomment-510670657 and https://github.com/rust-lang/rust/pull/134275#issuecomment-2543067830.

It is also a blocker for [setting the correct minimum OS version in `cc-rs`](https://github.com/rust-lang/rust/issues/136113), since fixing this in `cc-rs` might end up introducing linker errors in places where we weren't before (by default, if using e.g. ```@available(macos`` 10.15, *)`, the symbol usually happens to be left out, since `clang` defaults to compiling for the host macOS version, and thus things _seem_ to work - but the availability check actually compiles down to nothing, which is a huge correctness footgun for running on older OSes).

(My super secret evil agenda is also to expose some variant of ```@available``` in Rust's `std` after https://github.com/rust-lang/rfcs/pull/3750 progresses further, will probably file an ACP for this later. But I believe this PR has value regardless of those future plans, since we'd be making C/Objective-C/Swift interop easier).

## Solution

Implement `__isPlatformVersionAtLeast` and `__isOSVersionAtLeast` as part of the "public ABI" that `std` exposes.

**This is insta-stable**, in the same sense that additions to `compiler-builtins` are insta-stable, though the availability of these symbols can probably be considered a "quality of implementation" detail rather than a stable promise.

I originally proposed to implement this in `compiler-builtins`, see https://github.com/rust-lang/compiler-builtins/pull/794, but we discussed moving it to `std` instead ([Zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Provide.20.60__isPlatformVersionAtLeast.60.20in.20.60std.60.3F/with/507880717)), which makes the implementation substantially simpler, and we avoid gnarly issues with requiring the user to link `libSystem.dylib` (since `std` unconditionally does that).

Note that this does not solve the linker errors for (pure) `#![no_std]` users, but that's _probably_ fine, if you are using ```@available``` to test the OS version on Apple platforms, you're likely also using `std` (and it is still possible to work around by linking `libclang_rt.*.a`).

A thing to note about the implementation, I've choosen to stray a bit from LLVM's upstream implementation, and not use `_availability_version_check` since [it has problems when compiling with an older SDK](https://github.com/llvm/llvm-project/issues/64227). Instead, we use `sysctl kern.osproductversion` when available to still avoid the costly PList lookup in most cases, but still with a fall back to the PList lookup when that is not available (with the PList fallback being is similar to LLVM's implementation).

## Testing

Apple has a lot of different "modes" that they can run binaries in, which can be a bit difficult to find your bearings in, but I've tried to be as thorough as I could in testing them all.

Tested using roughly the equivalent of `./x test library/std -- platform_version` on the following configurations:
- macOS 14.7.3 on a Macbook Pro M2
    - `aarch64-apple-darwin`
    - `x86_64-apple-darwin` (under Rosetta)
    - `aarch64-apple-ios-macabi`
    - `x86_64-apple-ios-macabi` (under Rosetta)
    - `aarch64-apple-ios` (using Xcode's "Designed for iPad" setting)
    - `aarch64-apple-ios-sim` (in iOS Simulator, as iPhone with iOS 17.5)
    - `aarch64-apple-ios-sim` (in iOS Simulator, as iPad with iOS 18.2)
    - `aarch64-apple-tvos-sim` (in tvOS Simulator)
    - `aarch64-apple-watchos-sim` (in watchOS Simulator)
    - `aarch64-apple-ios-sim` (in visionOS simulator, using Xcode's "Designed for iPad" setting)
    - `aarch64-apple-visionos-sim` (in visionOS Simulator)
- macOS 15.3.1 VM
    - `aarch64-apple-darwin`
    - `aarch64-apple-ios-macabi`
- macOS 10.12.6 on an Intel Macbook from 2013
    - `x86_64-apple-darwin`
    - `i686-apple-darwin`
    - `x86_64-apple-ios` (in iOS Simulator)
- iOS 9.3.6 on a 1st generation iPad Mini
    - `armv7-apple-ios` with an older compiler

Along with manually inspecting the output of `version_from_sysctl()` and `version_from_plist()`, and verifying that they actually match what's expected.

I believe the only real omissions here would be:
- `aarch64-apple-ios` on a newer iPhone that has `sysctl` available (iOS 11.4 or above).
- `aarch64-apple-ios` on a Vision Pro using Xcode's "Designed for iPad" setting.

But I don't have the hardware available to test those.

``@rustbot`` label O-apple A-linkage -T-compiler -A-meta -A-run-make

try-job: aarch64-apple
2025-09-05 22:47:17 +02:00
Mads Marquart
846d6a4466 Add __isOSVersionAtLeast and __isPlatformVersionAtLeast symbols
Allows users to link to Objective-C code using `@available(...)`.
2025-09-05 16:18:49 +02:00
Trevor Gross
7fc547c4f2 Rollup merge of #146207 - alexcrichton:wasip2-stdio, r=juntyr
std: Implement WASIp2-specific stdio routines

This commit is an extension of rust-lang/rust#145944 but applied to stdio specifically. The stdio routines are updated away from WASIp1 APIs to using WASIp2 APIs natively. The end goal is to eventually drop the dependency on WASIp1 APIs in the standard library entirely in favor of exclusively depending on WASIp2.
2025-09-05 01:53:22 -04:00
ltdk
7ce8e289db Add Path::has_trailing_sep and related methods 2025-09-04 20:07:10 -04:00
Alex Crichton
d8ca776f6d std: Implement WASIp2-specific stdio routines
This commit is an extension of previous libstd support but applied to stdio
specifically. The stdio routines are updated away from WASIp1 APIs to using
WASIp2 APIs natively. The end goal is to eventually drop the dependency on
WASIp1 APIs in the standard library entirely in favor of exclusively depending
on WASIp2.
2025-09-04 09:15:10 -07:00
Matthias Krüger
60196de4c2 Rollup merge of #146194 - bend-n:fix-path-str-eq, r=ibraheemdev
fix path str eq

fixes rust-lang/rust#146183
where the impl for partialeq<str> for pathbuf resulted in infinite recursion
2025-09-04 17:45:49 +02:00
bendn
1e37c1fe2e fix 2025-09-04 18:33:47 +07:00
bendn
f19da67ed7 add test 2025-09-04 14:17:31 +07:00
Jacob Pratt
00d5dc5c9d Rollup merge of #145690 - sayantn:integer-funnel-shift, r=tgross35
Implement Integer funnel shifts

Tracking issue: rust-lang/rust#145686
ACP: https://github.com/rust-lang/libs-team/issues/642

This implements funnel shifts on primitive integer types. Implements this for cg_llvm, with a fallback impl for everything else

Thanks `@folkertdev` for the fixes and tests

cc `@rust-lang/libs-api`
2025-09-04 01:43:21 -04:00
Stuart Cook
98f6887f35 Rollup merge of #145209 - hanna-kruppe:path_add_extension, r=tgross35
Stabilize `path_add_extension`

FCP in tracking issue rust-lang/rust#127292 finished in January. There was more discussion since then, but [libs-api decided to match `set_extension`][0] by keeping the return type as-is and adding a panic for invalid extensions. The latter was implemented in rust-lang/rust#140163, so this feature should be ready for stabilization. But if anyone's unsure, another FCP could be done to confirm.

Closes rust-lang/rust#127292

[0]: https://github.com/rust-lang/rust/issues/127292#issuecomment-2605197960
2025-09-04 10:01:52 +10:00
Stuart Cook
f073f64eb6 Rollup merge of #140459 - niklasf:feature/read-buf-at, r=tgross35
Add `read_buf` equivalents for positioned reads

Adds the following items under the ~~`read_buf` (rust-lang/rust#78485)~~ `read_buf_at` (rust-lang/rust#140771) feature:

 - `std::os::unix::fs::FileExt::read_buf_at`
 - `std::os::unix::fs::FileExt::read_buf_exact_at`
 - `std::os::windows::fs::FileExt::seek_read_buf`

try-job: `x86_64-msvc*`
try-job: `test-various*`
try-job: `dist-various*`
2025-09-04 10:01:51 +10:00
Niklas Fiekas
c914c471b9 Add read_buf equivalents for positioned reads
Adds the following items under the `read_buf_at` feature:

 - `std::os::unix::fs::FileExt::read_buf_at`
 - `std::os::unix::fs::FileExt::read_buf_exact_at`
 - `std::os::windows::fs::FileExt::seek_read_buf`
2025-09-03 20:43:38 +02:00
joboet
82f5cdf33e std: improve the dlsym! macro and add a test for it
* Ensure nul-termination of the symbol name at compile-time
* Use an acquire load instead of a relaxed load and acquire fence
* Properly use `unsafe` and add safety comments
* Add tests
2025-09-03 17:58:45 +02:00
Stuart Cook
b5bba66a26 Rollup merge of #145944 - alexcrichton:native-wasip2, r=tgross35
std: Start supporting WASIp2 natively

This commit is the start of an effort to support WASIp2 natively in the
standard library. Before this commit the `wasm32-wasip2` target behaved
exactly like `wasm32-wasip1` target by importing APIs from the core wasm
module `wasi_snapshot_preview1`. These APIs are satisfied by the
`wasm-component-ld` target by using an [adapter] which implements WASIp1
in terms of WASIp2. This adapter comes at a cost, however, in terms of
runtime indirection and instantiation cost, so ideally the adapter would
be removed entirely. The purpose of this adapter was to provide a
smoother on-ramp from WASIp1 to WASIp2 when it was originally created.

The `wasm32-wasip2` target has been around for long enough now that it's
much more established. Additionally the only thing historically blocking
using WASIp2 directly was implementation effort. Work is now underway to
migrate wasi-libc itself to using WASIp2 directly and now seems as good
a time as any to migrate the Rust standard library too.

Implementation-wise the milestones here are:

* The `wasm32-wasip2` target now also depends on the `wasi` crate at
  version 0.14.* in addition to the preexisting dependency of 0.11.*.
  The 0.14.* release series binds WASIp2 APIs instead of WASIp1 APIs.
* Some preexisting naming around `mod wasi` or `wasi.rs` was renamed to
  `wasip1` where appropriate. For example `std::sys::pal::wasi` is now
  called `std::sys::pal::wasip1`.
* More platform-specific WASI modules are now split between WASIp1 and
  WASIp2. For example getting the current time, randomness, and
  process arguments now use WASIp2 APIs directly instead of using WASIp1
  APIs that require an adapter.

It's worth pointing out that this PR does not migrate the entire
standard library away from using WASIp1 APIs on the `wasm32-wasip2`
target. Everything related to file descriptors and filesystem APIs is
still using WASIp1. Migrating that is left for a future PR. In the
meantime the goal of this change is to lay the groundwork necessary for
migrating in the future. Eventually the goal is to drop the `wasi`
0.11.* dependency on the `wasm32-wasip2` target (the `wasm32-wasip1`
target will continue to retain this dependency).

[adapter]: https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-preview1-component-adapter/README.md
2025-09-03 23:08:08 +10:00
Stuart Cook
f4b946a147 Rollup merge of #145279 - clarfonthey:const-convert-initial, r=tgross35
Constify conversion traits (part 1)

This is the first part of rust-lang/rust#144289 being split into smaller pieces. It adds/moves constness of several traits under the `const_convert` feature:

* `From`
* `Into`
* `TryFrom`
* `TryInto`
* `FromStr`
* `AsRef`
* `AsMut`
* `Borrow`
* `BorrowMut`
* `Deref`
* `DerefMut`

There are a few methods that are intrinsically tied to these traits which I've included in the feature. Particularly, those which are wrappers over `AsRef`:

* `ByteStr::new` (unstable under `bstr` feature)
* `OsStr::new`
* `Path::new`

Those which directly use `Into`:

* `Result::into_ok`
* `Result::into_err`

And those which use `Deref` and `DerefMut`:

* `Pin::as_ref`
* `Pin::as_mut`
* `Pin::as_deref_mut`
* `Option::as_deref`
* `Option::as_deref_mut`
* `Result::as_deref`
* `Result::as_deref_mut`

(note: the `Option` and `Result` methods were suggested by ``@npmccallum`` initially as rust-lang/rust#146101)

The parts which are missing from this PR are:

* Anything that involves heap-allocated types
* Making any method const than the ones listed above
* Anything that could rely on the above, *or* could rely on system-specific code for `OsStr` or `Path` (note: this mostly makes these methods useless since `str` doesn't implement `AsRef<OsStr>` yet, but it's better to track the method for now and add impls later, IMHO)

r? ``@tgross35`` (who mostly already reviewed this)
2025-09-03 23:08:06 +10:00
sayantn
62b4347e80 Add funnel_sh{l,r} functions and intrinsics
- Add a fallback implementation for the intrinsics
 - Add LLVM backend support for funnel shifts

Co-Authored-By: folkertdev <folkert@folkertdev.nl>
2025-09-03 14:13:24 +05:30
Ralf Jung
39d51d04e7 thread parking: fix docs and examples 2025-09-03 09:14:25 +02:00
Guillaume Gomez
16b9a68eef Rollup merge of #146118 - RalfJung:miri-abort, r=joboet
improve process::abort rendering in Miri backtraces

Also, avoid using the `sys` function directly in the panic machinery -- that seems like an unnecessary layering violation.
2025-09-02 17:09:01 +02:00