Commit graph

27218 commits

Author SHA1 Message Date
joboet
bd523647a4
std: use libc version of _NSGetArgc/_NSGetArgv 2026-02-15 17:06:36 +01:00
Matthias Krüger
2ce5f487e0
Rollup merge of #145504 - Jules-Bertholet:more_conversion_trait_impls, r=tgross35
Add some conversion trait impls

- `impl<T, const N: usize> From<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` (cc https://github.com/rust-lang/rust/issues/96097)
- `impl<T, const N: usize> AsRef<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` (cc https://github.com/rust-lang/rust/issues/96097)
- `impl<T, const N: usize> AsRef<[MaybeUninit<T>]> for MaybeUninit<[T; N]>` (cc https://github.com/rust-lang/rust/issues/96097)
- `impl<T, const N: usize> AsMut<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` (cc https://github.com/rust-lang/rust/issues/96097)
- `impl<T, const N: usize> AsMut<[MaybeUninit<T>]> for MaybeUninit<[T; N]>` (cc https://github.com/rust-lang/rust/issues/96097)
- `impl<T, const N: usize> From<MaybeUninit<[T; N]>> for [MaybeUninit<T>; N]` (cc https://github.com/rust-lang/rust/issues/96097)
- `impl<T, const N: usize> AsRef<[Cell<T>; N]> for Cell<[T; N]>` (equivalent of `as_array_of_cells`, cc https://github.com/rust-lang/rust/issues/88248)
- `impl<T, const N: usize> AsRef<[Cell<T>]> for Cell<[T; N]>`
- `impl<T> AsRef<[Cell<T>]> for Cell<[T]>` (equivalent of `as_slice_of_cells`)

@rustbot label T-libs-api needs-fcp -T-libs

I’ve tried to only add impls that are unlikely to cause single-applicable-impl inference breakage.
2026-02-09 18:39:42 +01:00
Matthias Krüger
c15f4e0e47
Rollup merge of #142957 - xizheyin:142931, r=tgross35
std: introduce path normalize methods at top of `std::path`

Closes rust-lang/rust#142931

Mention other methods that call `conponents` and `canonicalize` that fully normalize path. And fix two typo.

r? libs
2026-02-09 18:39:41 +01:00
Matthias Krüger
e2ddf5c951
Rollup merge of #152166 - cyrgani:questionable-pm-cleanups, r=petrochenkov
cleanup some more things in `proc_macro::bridge`

Each commit should be reviewable on its own.
2026-02-09 18:39:40 +01:00
Matthias Krüger
144b77aad2
Rollup merge of #151613 - cuviper:array-windows-parity, r=Amanieu
Align `ArrayWindows` trait impls with `Windows`

With `slice::ArrayWindows` getting ready to stabilize in 1.94, I noticed that it currently has some differences in trait implementations compared to `slice::Windows`, and I think we should align these.

- Remove `derive(Copy)` -- we generally don't want `Copy` for iterators at all, as this is seen as a footgun (e.g. rust-lang/rust#21809). This is obviously a breaking change though, so we should only remove this if we also backport the removal before it's stable. Otherwise, it should at least be replaced by a manual impl without requiring `T: Copy`.
- Manually `impl Clone`, simply to avoid requiring `T: Clone`.
- `impl FusedIterator`, because it is trivially so. The `since = "1.94.0"` assumes we'll backport this, otherwise we should change that to the "current" placeholder.
- `impl TrustedLen`, because we can trust our implementation.
- `impl TrustedRandomAccess`, because the required `__iterator_get_unchecked` method is straightforward.

r? libs-api

@rustbot label beta-nominated
(at least for the `Copy` removal, but we could be more selective about the rest).
2026-02-09 18:39:39 +01:00
xizheyin
88c296a19f std: introduce path normalize methods at top of std::path 2026-02-09 18:25:26 +08:00
Jacob Pratt
e046884f49
Rollup merge of #152357 - nicholasbishop:push-uolpvnvrlznw, r=joboet
std: Don't panic when removing a nonexistent UEFI var

`std::env::remove_var` does not say that deleting a nonexistent variable is an error (and at least on Linux, it indeed does not cause an error).

The UEFI Shell Protocol spec also doesn't say it's an error, but the edk2 implementation delegates to the UEFI runtime `SetVariable` function, which returns `EFI_NOT_FOUND` when trying to delete a nonexistent variable.

Change the UEFI implementation to check for a `NotFound` error and treat it as success.

CC @Ayush1325
2026-02-09 05:20:27 -05:00
Stuart Cook
7cb4501916
Rollup merge of #152291 - jdonszelmann:port-rustc-insignificant-dtor, r=jonathanbrouwer
Port `rustc_insignificant_dtor`

r? @JonathanBrouwer

Second commit removes it from an impl in std. I looked, and I really think it had no effect in the past. We only look for this attr on ADTs...
2026-02-09 14:32:01 +11:00
Stuart Cook
11c7917874
Rollup merge of #152071 - hanna-kruppe:stdio-fd-consts, r=ChrisDenton
Implement stdio FD constants

Tracking issue: rust-lang/rust#150836
2026-02-09 14:32:00 +11:00
Jana Dönszelmann
9d6e120939
remove from impl block in std 2026-02-08 22:22:58 +01:00
Jonathan Brouwer
9f778b4341
Rollup merge of #152275 - scottmcm:range-range-inclusive, r=Mark-Simulacrum
Stop having two different alignment constants

Now that there's a `<T as SizedTypeProperties>::ALIGNMENT` constant, `Alignment::of` can use that instead of an inline constant, like how `Layout::new` uses the constant from `SizedTypeProperties`.
2026-02-08 21:06:30 +01:00
Jonathan Brouwer
c33bd8aa53
Rollup merge of #126100 - scottmcm:decaveat-map, r=Mark-Simulacrum
Reword the caveats on `array::map`

Thanks to #107634 and some improvements in LLVM (particularly [`dead_on_unwind`](https://llvm.org/docs/LangRef.html#parameter-attributes)), the method actually optimizes reasonably well now.

So focus the discussion on the fundamental ordering differences where the optimizer might never be able to fix it because of the different behaviour, and keep encouraging `Iterator::map` where an array wasn't actually ever needed.
2026-02-08 21:06:29 +01:00
Mark Rousskov
4a979d546b Stop having two different alignment constants
* Stop having two different alignment constants
* Update library/core/src/alloc/global.rs
2026-02-08 19:54:03 +00:00
Nicholas Bishop
4d07a8f24c std: Don't panic when removing a nonexistent UEFI var
`std::env::remove_var` does not say that deleting a nonexistent variable
is an error (and at least on Linux, it indeed does not cause an
error).

The UEFI Shell Protocol spec also doesn't say it's an error, but the
edk2 implementation delegates to the UEFI runtime `SetVariable`
function, which returns `EFI_NOT_FOUND` when trying to delete a
nonexistent variable.

Change the UEFI implementation to check for a `NotFound` error and treat
it as success.
2026-02-08 12:38:28 -05:00
Jules Bertholet
d0b3a0bdc0
Add some conversion trait impls
- `impl<T, const N: usize> From<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>`
- `impl<T, const N: usize> AsRef<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>`
- `impl<T, const N: usize> AsRef<[MaybeUninit<T>]> for MaybeUninit<[T; N]>`
- `impl<T, const N: usize> AsMut<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>`
- `impl<T, const N: usize> AsMut<[MaybeUninit<T>]> for MaybeUninit<[T; N]>`
- `impl<T, const N: usize> From<MaybeUninit<[T; N]>> for [MaybeUninit<T>; N]`
- `impl<T, const N: usize> AsRef<[Cell<T>; N]> for Cell<[T; N]>`
- `impl<T, const N: usize> AsRef<[Cell<T>]> for Cell<[T; N]>`
- `impl<T> AsRef<[Cell<T>]> for Cell<[T]>`
2026-02-07 17:09:23 -05:00
Jonathan Brouwer
7b8be37c1f
Rollup merge of #152292 - GrigorenkoPV:sigma, r=Noratrieb
Minor change for readability

Everyone praise inline const blocks!
2026-02-07 19:34:51 +01:00
Jonathan Brouwer
5964330d29
Rollup merge of #152056 - hzeller:feature-20260203-clarify-rwlock-reentrance, r=joboet
RwLock: refine documentation to emphasize non-reentrancy guarantees

This addresses the need for clarification brought up in rust-lang/rust#149693. Specifically, it notes that some implementations may choose to panic if they detect deadlock situations during recursive locking attempts for both `read()` and `write()` calls.

  * Provide an example highlighting that multiple read locks can be held across different threads simultaneously.
  * Remove the example that shows a situation that can potentially deadlock. (as demonstrated in the very same documentation a few paragraphs above)
  * Improve documentation regarding the possibility of panics during recursive read or write lock attempts.

Issues: https://github.com/rust-lang/rust/issues/149693
2026-02-07 19:34:49 +01:00
Pavel Grigorenko
da421f5585 const { 'Σ'.len_utf8() } 2026-02-07 17:20:39 +03:00
Jonathan Brouwer
27d6b3c9b7
Rollup merge of #151576 - tgross35:stabilize-cold-path, r=jhpratt
Stabilize `core::hint::cold_path`

`cold_path` has been around unstably for a while and is a rather useful tool to have. It does what it is supposed to and there are no known remaining issues, so stabilize it here (including const).

Newly stable API:

```rust
// in core::hint
pub const fn cold_path();
```

I have opted to exclude `likely` and `unlikely` for now since they have had some concerns about ease of use that `cold_path` doesn't suffer from. `cold_path` is also significantly more flexible; in addition to working with boolean `if` conditions, it can be used in `match` arms, `if let`, closures, and other control flow blocks. `likely` and `unlikely` are also possible to implement in user code via `cold_path`, if desired.

Closes: https://github.com/rust-lang/rust/issues/136873 (tracking issue)

---

There has been some design and implementation work for making `#[cold]` function in more places, such as `if` arms, `match` arms, and closure bodies. Considering a stable `cold_path` will cover all of these usecases, it does not seem worth pursuing a more powerful `#[cold]` as an alternative way to do the same thing. If the lang team agrees, then:

Closes: https://github.com/rust-lang/rust/issues/26179
Closes: https://github.com/rust-lang/rust/pull/120193
2026-02-07 13:06:35 +01:00
Jonathan Brouwer
0a5d0e9aa2
Rollup merge of #152267 - sorairolake:feature/nonzero-from-ascii, r=dtolnay
feat: Implement `int_from_ascii` for `NonZero<T>`

- Tracking issue: rust-lang/rust#134821

This pull request adds `from_ascii` and `from_ascii_radix` methods to `NonZero<T>` that parses a non-zero integer from an ASCII-byte slice (`&[u8]`) with decimal digits or digits in a given base.

When using the combination of `int::from_ascii` or `int::from_ascii_radix` and `NonZero::<T>::new`, [`IntErrorKind::Zero`](https://doc.rust-lang.org/core/num/enum.IntErrorKind.html#variant.Zero) cannot be returned as an error.

`NonZero::<T>::from_str_radix` and `NonZero::<T>::from_str` require a string (`&str`) as a parameter.

```rust
// Cannot return `IntErrorKind::Zero` as an error.
assert_eq!(NonZero::new(u8::from_ascii(b"0").unwrap()), None);

// Can return `IntErrorKind::Zero` as an error.
let err = NonZero::<u8>::from_ascii(b"0").unwrap_err();
assert_eq!(err.kind(), &IntErrorKind::Zero);
```

See also rust-lang/rust#152193
2026-02-07 13:06:35 +01:00
Jonathan Brouwer
29079e41a7
Rollup merge of #150522 - pitaj:stabilize-new-rangeinclusive, r=tgross35
Stabilize new inclusive range type and iterator type

Part 1 of stabilizing the new range types for rust-lang/rust#125687

stabilizes `core::range::RangeInclusive` and `core::range::RangeInclusiveIter`. Newly stable API:

```rust
// in core and std
pub mod range;

// in core::range

pub struct RangeInclusive<Idx> {
    pub start: Idx,
    pub last: Idx,
}

impl<Idx: fmt::Debug> fmt::Debug for RangeInclusive<Idx> { /* ... */ }

impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
    pub const fn contains<U>(&self, item: &U) -> bool
    where
        Idx: [const] PartialOrd<U>,
        U: ?Sized + [const] PartialOrd<Idx>;

    pub const fn is_empty(&self) -> bool
    where
        Idx: [const] PartialOrd;
}

impl<Idx: Step> RangeInclusive<Idx> {
    pub fn iter(&self) -> RangeInclusiveIter<Idx>;
}

impl<T> const RangeBounds<T> for RangeInclusive<T> { /* ... */ }
impl<T> const RangeBounds<T> for RangeInclusive<&T> { /* ... */ }

impl<T> const From<RangeInclusive<T>> for legacy::RangeInclusive<T> { /* ... */ }
impl<T> const From<legacy::RangeInclusive<T>> for RangeInclusive<T> { /* ... */ }

pub struct RangeInclusiveIter<A>(/* ... */);

impl<A: Step> RangeInclusiveIter<A> {
    pub fn remainder(self) -> Option<RangeInclusive<A>>;
}

impl<A: Step> Iterator for RangeInclusiveIter<A> {
    type Item = A;
    /* ... */
}

impl<A: Step> DoubleEndedIterator for RangeInclusiveIter<A> { /* ... */ }
impl<A: Step> FusedIterator for RangeInclusiveIter<A> { }
impl<A: Step> IntoIterator for RangeInclusive<A> {
    type Item = A;
    type IntoIter = RangeInclusiveIter<A>;
    /* ... */
}

impl ExactSizeIterator for RangeInclusiveIter<u8> { }
impl ExactSizeIterator for RangeInclusiveIter<i8> { }

unsafe impl<T> const SliceIndex<[T]> for range::RangeInclusive<usize> {
    type Output = [T];
    /* ... */
}
unsafe impl const SliceIndex<str> for range::RangeInclusive<usize> {
    type Output = str;
    /* ... */
}
```

I've removed the re-exports temporarily because from what I can tell, there's no way to make re-exports of stable items unstable. They will be added back and stabilized in a separate PR.
2026-02-07 13:06:34 +01:00
Jonathan Brouwer
6fe0999ad6
Rollup merge of #148590 - GrigorenkoPV:atomic_try_update, r=jhpratt
Stabilize `atomic_try_update`and deprecate `fetch_update` starting 1.99.0

Tracking issue: rust-lang/rust#135894
FCP completed: https://github.com/rust-lang/rust/issues/135894#issuecomment-3685449783

~1.96.0 was chosen because I don't think the remaining month until 1.93.0 becomes beta is enough for the FCP to finish and this to get merged, so 1.94.0 + a couple of versions of leeway: https://github.com/rust-lang/rust/issues/135894#issuecomment-3491707614~

1.99 suggested in https://github.com/rust-lang/rust/pull/148590#discussion_r2730000452

Closes rust-lang/rust#135894
2026-02-07 13:06:33 +01:00
Shun Sakai
d837cf6700 feat: Implement int_from_ascii for NonZero<T> 2026-02-07 13:48:52 +09:00
Peter Jaszkowiak
d2020fbf7c stabilize new inclusive range type and iter
stabilizes `core::range::RangeInclusive`
and `core::range::RangeInclusiveIter`
and the `core::range` module
2026-02-06 21:36:15 -07:00
cyrgani
74d2616efc deduplicate Tag enum 2026-02-06 21:26:46 +00:00
cyrgani
a6062a84bc use mem::conjure_zst directly 2026-02-06 21:26:46 +00:00
cyrgani
18996c6985 make with_api! take explicit type paths 2026-02-06 21:26:46 +00:00
cyrgani
1a03742c25 simplify some other generics 2026-02-06 21:26:46 +00:00
nxsaken
4b427b2f33 Stabilize const ControlFlow predicates 2026-02-07 00:33:52 +04:00
bors
bce89b6a56 Auto merge of #152230 - JonathanBrouwer:rollup-de59XEq, r=JonathanBrouwer
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#151590 (cmse: don't use `BackendRepr` when checking return type)
 - rust-lang/rust#151945 (feat: Add `NonZero::<T>::from_str_radix`)
 - rust-lang/rust#152000 (Fix ICE in normalizing inherent associated consts with `#[type_const]`)
 - rust-lang/rust#152192 (Always use Xcode-provided Clang in macOS CI)
 - rust-lang/rust#152196 (bootstrap: Remove `ShouldRun::paths`)
 - rust-lang/rust#152222 (Re-add TaKO8Ki to triagebot review queue)
2026-02-06 15:32:38 +00:00
bors
55bfca7d7d Auto merge of #152183 - alexcrichton:update-wasi-sdk, r=jieyouxu
Update wasi-sdk used in CI/releases

This is similar to prior updates such as rust-lang/rust#149037 in that this is just updating a URL. This update though has some technical updates accompanying it as well, however:

* The `wasm32-wasip2` target no longer uses APIs from WASIp1 on this target, even for startup. This means that the final binary no longer has an "adapter" which can help making instantiation of a component a bit more lean.

* In rust-lang/rust#147572 libstd was updated to use wasi-libc more often on the `wasm32-wasip2` target. This uncovered a number of bugs in wasi-libc such as rust-lang/rust#149864, rust-lang/rust#150291, and rust-lang/rust#151016. These are all fixed in wasi-sdk-30 so the workarounds in the standard library are all removed.

Overall this is not expected to have any sort of major impact on users of WASI targets. Instead it's expected to be a normal routine update to keep the wheels greased and oiled.
2026-02-06 12:21:48 +00:00
Shun Sakai
d0aa337146 feat: Add NonZero::<T>::from_str_radix 2026-02-06 16:15:00 +09:00
许杰友 Jieyou Xu (Joe)
de68f27bc1
Rollup merge of #152174 - folkertdev:stdarch-sync-2026-02-05, r=folkertdev
stdarch subtree update

Subtree update of `stdarch` to 1a7cc47efc.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-02-06 10:25:42 +08:00
Alex Crichton
8e26944f62 Update wasi-sdk used in CI/releases
This is similar to prior updates such as 149037 in that this is just
updating a URL. This update though has some technical updates
accompanying it as well, however:

* The `wasm32-wasip2` target no longer uses APIs from WASIp1 on this
  target, even for startup. This means that the final binary no longer
  has an "adapter" which can help making instantiation of a component a
  bit more lean.

* In 147572 libstd was updated to use wasi-libc more often on the
  `wasm32-wasip2` target. This uncovered a number of bugs in
  wasi-libc such as 149864, 150291, and 151016. These are all fixed in
  wasi-sdk-30 so the workarounds in the standard library are all
  removed.

Overall this is not expected to have any sort of major impact on users
of WASI targets. Instead it's expected to be a normal routine update to
keep the wheels greased and oiled.
2026-02-05 15:04:55 -08:00
Eddy (Eduard) Stefes
edeb02f382 disable s390x vector intrinsics if softfloat is enabled
we will add an explicit incompatibility of softfloat and vector feature
in rutsc s390x-unknown-none-softfloat target specification.
Therefore we need to disable vector intrinsics here to be able to compile
core for this target.
2026-02-05 13:36:18 +01:00
cyrgani
749d62b262 remove Closure generics 2026-02-05 11:40:11 +00:00
cyrgani
1a240d604c expand define_reify_functions! 2026-02-05 11:39:38 +00:00
Jonathan Brouwer
cb77fcb3a6
Rollup merge of #152133 - Enselic:on-broken-pipe-flag-rename, r=ChrisDenton
library/std: Rename `ON_BROKEN_PIPE_FLAG_USED` to `ON_BROKEN_PIPE_USED`

This commit is a pure internal rename and does not change any functionality.

The `FLAG_` part of `ON_BROKEN_PIPE_FLAG_USED` comes from that the compiler flag `-Zon-broken-pipe=...` is used to enable the feature.

Remove the `FLAG_` part so the name works both for the current compiler flag `-Zon-broken-pipe=...` and for the upcoming [Externally Implementable Item `#[std::io::on_broken_pipe]`](https://github.com/rust-lang/rust/pull/150591) PR. This makes the diff of that PR smaller.

The local variable name `sigpipe_attr_specified` comes from way back when the feature was controlled with an `fn main()` attribute called `#[unix_sigpipe = "..."]`. Rename that too.
2026-02-05 12:17:03 +01:00
Folkert de Vries
cfcf20fe90
Merge pull request #2018 from rust-lang/revert-2014-llvm-22-madd
Revert "Revert "Use LLVM intrinsics for `madd` intrinsics""
2026-02-05 09:33:31 +00:00
The rustc-josh-sync Cronjob Bot
32b93d1f94 Merge ref 'db3e99bbab' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@db3e99bbab
Filtered ref: rust-lang/stdarch@4749411ab3
Upstream diff: 873d4682c7...db3e99bbab

This merge was created using https://github.com/rust-lang/josh-sync.
2026-02-05 04:37:20 +00:00
The rustc-josh-sync Cronjob Bot
8c404a7649 Prepare for merging from rust-lang/rust
This updates the rust-version file to db3e99bbab.
2026-02-05 04:37:12 +00:00
Zalathar
6970849fee Disable flaky test oneshot::recv_timeout_before_send 2026-02-05 12:38:23 +11:00
Martin Nordholts
01c0c147c5 library/std: Rename ON_BROKEN_PIPE_FLAG_USED to ON_BROKEN_PIPE_USED
This commmit is a pure rename and does not change any functionality.

The `FLAG_` part of `ON_BROKEN_PIPE_FLAG_USED` comes from that the
compiler flag `-Zon-broken-pipe=...` is used to enable the feature.

Remove the `FLAG_` part so the name works both for the flag
`-Zon-broken-pipe=...` and for the upcoming Externally Implementable
Item `#[std::io::on_broken_pipe]`. This makes the diff of that PR
smaller.

The local variable name `sigpipe_attr_specified` comes from way back
when the feature was controlled with an `fn main()` attribute called
`#[unix_sigpipe = "..."]`. Rename that too.
2026-02-04 19:47:51 +01:00
Jonathan Brouwer
3184d55536
Rollup merge of #152083 - chenyukang:yukang-fix-set-times-nofollow-on-windows, r=ChrisDenton
Fix set_times_nofollow for directory on windows

Fix issue from:
https://github.com/rust-lang/rust/issues/147455#issuecomment-3841311858

old code `opts.write(true)` on Windows requests `GENERIC_WRITE` access, replace with `opts.access_mode(c::FILE_WRITE_ATTRIBUTES)` to get minimal permission.

r? @joshtriplett
2026-02-04 14:39:28 +01:00
yukang
8e62b1d0e1 Fix set_times_nofollow for directory on windows 2026-02-04 03:58:26 +00:00
Hanna Kruppe
8b5be2b271 Implement stdio FD constants 2026-02-03 22:35:09 +01:00
Jonathan Brouwer
881604a61a
Rollup merge of #152029 - RalfJung:miri-socket-tests, r=Mark-Simulacrum
disable socket tests in Miri

https://github.com/rust-lang/rust/pull/150428 added some tests that do not work in Miri since we do not support sockets.

r? @Mark-Simulacrum
2026-02-03 18:54:50 +01:00
Henner Zeller
27f97d7f71 RwLock: refine documentation to emphasize non-reentrancy guarantees
This addresses the need for clarification brought up in an issue.
Specifically, it notes that some implementations may choose to panic if
they detect deadlock situations during recursive locking attempts for
both `read()` and `write()` calls.

  * Provide an example highlighting that multiple read locks can be
    held across different threads simultaneously.
  * Remove the example that shows a situation that can potentially deadlock.
    (as demonstrated in the very same documentation a few paragraphs
    above)
  * Improve documentation regarding the possibility of panics during
    recursive read or write lock attempts.

Issues: Ambiguity in RwLock documentation about multiple read() calls...

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-02-03 07:48:05 -08:00
Stuart Cook
37ece9cf9b
Rollup merge of #151109 - tyhdefu:float_bits_const, r=tgross35
fN::BITS constants for feature float_bits_const

Also enables the feature for compiler_builtins as otherwise this causes a warning and conflicts with the Float extension trait.

---
Implementation for rust-lang/rust#151073

Feature flag: `#![feature(float_bits_const)]`

Note that this is likely to conflict with some extension traits, as it has with compiler builtins. However, assuming correct values for the constants, they are either `u32`, the same type, which should not cause a problem (as shown by enabling the feature for compiler_builtins), or a different type (e.g. `usize`), which should cause a compiler error. Either way this should never change behaviour unless the extension trait implemented an incorrect value.

Also note that it doesn't seem to be possible to put multiple unstable attributes on an item, so `f128::BITS` and `f16::BITS` are gated behind the feature flags for those primitives, rather than `#![feature(float_bits_const)]`
2026-02-03 21:58:39 +11:00
Ralf Jung
079913ec71 disable socket tests in Miri 2026-02-03 09:02:39 +01:00