diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-25 20:11:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-25 20:11:00 +0200 |
| commit | 3a3352386cae7d0c7c2a4bb49e92de390687f664 (patch) | |
| tree | 6ce41320a84c972bf08ccf72cc0a40f62ccc387e /library/std/src/sys/pal/unix/stack_overflow.rs | |
| parent | 3b2580914b3f5d9599dbb9b3ed4a683d4e52f1ea (diff) | |
| parent | 1151eb1c8467a454ceb65a0f9f5e71104a591ef3 (diff) | |
| download | rust-3a3352386cae7d0c7c2a4bb49e92de390687f664.tar.gz rust-3a3352386cae7d0c7c2a4bb49e92de390687f664.zip | |
Rollup merge of #130832 - RalfJung:sort-cfg-mess, r=workingjubilee
fix some cfg logic around optimize_for_size and 16-bit targets
Fixes https://github.com/rust-lang/rust/issues/130818.
Fixes https://github.com/rust-lang/rust/issues/129910.
There are still some warnings when building on a 16bit target:
```
warning: struct `AlignedStorage` is never constructed
--> /home/r/src/rust/rustc.2/library/core/src/slice/sort/stable/mod.rs:135:8
|
135 | struct AlignedStorage<T, const N: usize> {
| ^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: associated items `new` and `as_uninit_slice_mut` are never used
--> /home/r/src/rust/rustc.2/library/core/src/slice/sort/stable/mod.rs:141:8
|
140 | impl<T, const N: usize> AlignedStorage<T, N> {
| -------------------------------------------- associated items in this implementation
141 | fn new() -> Self {
| ^^^
...
145 | fn as_uninit_slice_mut(&mut self) -> &mut [MaybeUninit<T>] {
| ^^^^^^^^^^^^^^^^^^^
warning: function `quicksort` is never used
--> /home/r/src/rust/rustc.2/library/core/src/slice/sort/unstable/quicksort.rs:19:15
|
19 | pub(crate) fn quicksort<'a, T, F>(
| ^^^^^^^^^
warning: `core` (lib) generated 3 warnings
```
However, the cfg stuff here is sufficiently messy that I didn't want to touch more of it. I think all `feature = "optimize_for_size"` should become `any(feature = "optimize_for_size", target_pointer_width = "16")` but I am not entirely certain. Warnings are fine, Miri will just ignore them.
Cc `@Voultapher`
Diffstat (limited to 'library/std/src/sys/pal/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
