const impl PartialEq for f16b - #163530
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Jamesbarford
force-pushed
the
bf16-const-cmp
branch
from
September 30, 2026 15:13
9b39cc4 to
774f46c
Compare
This comment has been minimized.
This comment has been minimized.
Jamesbarford
force-pushed
the
bf16-const-cmp
branch
from
October 1, 2026 07:04
774f46c to
5764566
Compare
Contributor
|
@bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Oct 1, 2026
…kertdev
`const impl PartialEq` for `f16b`
This is needed for stdarch which has the following trait bounds;
```rust
/// SAFETY: All bits patterns must be valid
pub(crate) unsafe trait SimdElement:
Copy + const PartialEq + crate::fmt::Debug
{
// SAFETY: all bits patterns of types implementing this trait must be valid
const ZERO: Self = unsafe { crate::mem::zeroed() };
}
```
And we need;
```rust
#[cfg(any(target_has_reliable_f16b, doc))]
unsafe impl SimdElement for core::num::f16b {}
```
r? folkertdev
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Oct 1, 2026
…kertdev
`const impl PartialEq` for `f16b`
This is needed for stdarch which has the following trait bounds;
```rust
/// SAFETY: All bits patterns must be valid
pub(crate) unsafe trait SimdElement:
Copy + const PartialEq + crate::fmt::Debug
{
// SAFETY: all bits patterns of types implementing this trait must be valid
const ZERO: Self = unsafe { crate::mem::zeroed() };
}
```
And we need;
```rust
#[cfg(any(target_has_reliable_f16b, doc))]
unsafe impl SimdElement for core::num::f16b {}
```
r? folkertdev
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Oct 1, 2026
…kertdev
`const impl PartialEq` for `f16b`
This is needed for stdarch which has the following trait bounds;
```rust
/// SAFETY: All bits patterns must be valid
pub(crate) unsafe trait SimdElement:
Copy + const PartialEq + crate::fmt::Debug
{
// SAFETY: all bits patterns of types implementing this trait must be valid
const ZERO: Self = unsafe { crate::mem::zeroed() };
}
```
And we need;
```rust
#[cfg(any(target_has_reliable_f16b, doc))]
unsafe impl SimdElement for core::num::f16b {}
```
r? folkertdev
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 1, 2026
Rollup of 11 pull requests Successful merges: - #163483 (Bump bootstrap compiler to 1.100.0 beta) - #161380 (only rerun const eval in next-solver if the const actually references opaques) - #162900 (Some refactorings around metadata encoding) - #163580 (Provide better doc code example for `UnixDatagram::bind_addr` and `UnixListener::bind_addr`) - #163584 ([triagebot] Ping me for debugger visualizer changes) - #162904 (Fix ICE for ambiguous candidates on method probing) - #163281 (Add `f16` inline ASM support to `spirv.rs`) - #163314 (move `#[macro_export]` on declarative macro check to `rustc_attr_parsing`) - #163405 (Remove some #[linkage] options) - #163530 (`const impl PartialEq` for `f16b`) - #163581 (do not suggest precise capturing when the opaque span is in a macro expansion)
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 1, 2026
…uwer Rollup of 20 pull requests Successful merges: - #163483 (Bump bootstrap compiler to 1.100.0 beta) - #161380 (only rerun const eval in next-solver if the const actually references opaques) - #162900 (Some refactorings around metadata encoding) - #163461 (Improve diagnostic deduplication) - #163580 (Provide better doc code example for `UnixDatagram::bind_addr` and `UnixListener::bind_addr`) - #163584 ([triagebot] Ping me for debugger visualizer changes) - #159021 (windows-gnu: enable native TLS) - #161467 (wfcheck: name the item that discards an unused type parameter) - #162618 (trait_selection: Preserve eager normalization failures) - #162904 (Fix ICE for ambiguous candidates on method probing) - #163064 (Avoid computing overflowed goal chains for crate dependencies) - #163281 (Add `f16` inline ASM support to `spirv.rs`) - #163314 (move `#[macro_export]` on declarative macro check to `rustc_attr_parsing`) - #163360 ([rustdoc] Correctly handle rustc_allow_incoherent_impl on primitive methods) - #163385 (GVN transmutes of Immediate::Uninit to Immediate::Uninit) - #163405 (Remove some #[linkage] options) - #163530 (`const impl PartialEq` for `f16b`) - #163581 (do not suggest precise capturing when the opaque span is in a macro expansion) - #163590 (Make `AllocatorNightly` less clever) - #163599 (Add union pattern reference change to relnotes)
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 1, 2026
…uwer Rollup of 20 pull requests Successful merges: - #163483 (Bump bootstrap compiler to 1.100.0 beta) - #161380 (only rerun const eval in next-solver if the const actually references opaques) - #162900 (Some refactorings around metadata encoding) - #163461 (Improve diagnostic deduplication) - #163580 (Provide better doc code example for `UnixDatagram::bind_addr` and `UnixListener::bind_addr`) - #163584 ([triagebot] Ping me for debugger visualizer changes) - #159021 (windows-gnu: enable native TLS) - #161467 (wfcheck: name the item that discards an unused type parameter) - #162618 (trait_selection: Preserve eager normalization failures) - #162904 (Fix ICE for ambiguous candidates on method probing) - #163064 (Avoid computing overflowed goal chains for crate dependencies) - #163281 (Add `f16` inline ASM support to `spirv.rs`) - #163314 (move `#[macro_export]` on declarative macro check to `rustc_attr_parsing`) - #163360 ([rustdoc] Correctly handle rustc_allow_incoherent_impl on primitive methods) - #163385 (GVN transmutes of Immediate::Uninit to Immediate::Uninit) - #163405 (Remove some #[linkage] options) - #163530 (`const impl PartialEq` for `f16b`) - #163581 (do not suggest precise capturing when the opaque span is in a macro expansion) - #163590 (Make `AllocatorNightly` less clever) - #163599 (Add union pattern reference change to relnotes)
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 2, 2026
…uwer Rollup of 20 pull requests Successful merges: - #163483 (Bump bootstrap compiler to 1.100.0 beta) - #161380 (only rerun const eval in next-solver if the const actually references opaques) - #162900 (Some refactorings around metadata encoding) - #163461 (Improve diagnostic deduplication) - #163580 (Provide better doc code example for `UnixDatagram::bind_addr` and `UnixListener::bind_addr`) - #163584 ([triagebot] Ping me for debugger visualizer changes) - #159021 (windows-gnu: enable native TLS) - #161467 (wfcheck: name the item that discards an unused type parameter) - #162618 (trait_selection: Preserve eager normalization failures) - #162904 (Fix ICE for ambiguous candidates on method probing) - #163064 (Avoid computing overflowed goal chains for crate dependencies) - #163281 (Add `f16` inline ASM support to `spirv.rs`) - #163314 (move `#[macro_export]` on declarative macro check to `rustc_attr_parsing`) - #163360 ([rustdoc] Correctly handle rustc_allow_incoherent_impl on primitive methods) - #163385 (GVN transmutes of Immediate::Uninit to Immediate::Uninit) - #163405 (Remove some #[linkage] options) - #163530 (`const impl PartialEq` for `f16b`) - #163581 (do not suggest precise capturing when the opaque span is in a macro expansion) - #163590 (Make `AllocatorNightly` less clever) - #163599 (Add union pattern reference change to relnotes)
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 2, 2026
Rollup merge of #163530 - Jamesbarford:bf16-const-cmp, r=folkertdev `const impl PartialEq` for `f16b` This is needed for stdarch which has the following trait bounds; ```rust /// SAFETY: All bits patterns must be valid pub(crate) unsafe trait SimdElement: Copy + const PartialEq + crate::fmt::Debug { // SAFETY: all bits patterns of types implementing this trait must be valid const ZERO: Self = unsafe { crate::mem::zeroed() }; } ``` And we need; ```rust #[cfg(any(target_has_reliable_f16b, doc))] unsafe impl SimdElement for core::num::f16b {} ``` r? folkertdev
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this pull request
Oct 3, 2026
…uwer Rollup of 20 pull requests Successful merges: - rust-lang/rust#163483 (Bump bootstrap compiler to 1.100.0 beta) - rust-lang/rust#161380 (only rerun const eval in next-solver if the const actually references opaques) - rust-lang/rust#162900 (Some refactorings around metadata encoding) - rust-lang/rust#163461 (Improve diagnostic deduplication) - rust-lang/rust#163580 (Provide better doc code example for `UnixDatagram::bind_addr` and `UnixListener::bind_addr`) - rust-lang/rust#163584 ([triagebot] Ping me for debugger visualizer changes) - rust-lang/rust#159021 (windows-gnu: enable native TLS) - rust-lang/rust#161467 (wfcheck: name the item that discards an unused type parameter) - rust-lang/rust#162618 (trait_selection: Preserve eager normalization failures) - rust-lang/rust#162904 (Fix ICE for ambiguous candidates on method probing) - rust-lang/rust#163064 (Avoid computing overflowed goal chains for crate dependencies) - rust-lang/rust#163281 (Add `f16` inline ASM support to `spirv.rs`) - rust-lang/rust#163314 (move `#[macro_export]` on declarative macro check to `rustc_attr_parsing`) - rust-lang/rust#163360 ([rustdoc] Correctly handle rustc_allow_incoherent_impl on primitive methods) - rust-lang/rust#163385 (GVN transmutes of Immediate::Uninit to Immediate::Uninit) - rust-lang/rust#163405 (Remove some #[linkage] options) - rust-lang/rust#163530 (`const impl PartialEq` for `f16b`) - rust-lang/rust#163581 (do not suggest precise capturing when the opaque span is in a macro expansion) - rust-lang/rust#163590 (Make `AllocatorNightly` less clever) - rust-lang/rust#163599 (Add union pattern reference change to relnotes)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is needed for stdarch which has the following trait bounds;
And we need;
r? folkertdev