Skip to content

add ABI compat checks for new float types - #166005

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
RalfJung:float-abi
Nov 16, 2026
Merged

rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
RalfJung:float-abi

Conversation

@RalfJung

Copy link
Copy Markdown
Member

These types are quite special ABI-wise, let's make sure they are covered here as well.

r? @folkertdev
Are there any float types I missed?

@rustbot

rustbot commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator

miri is developed in its own repository. If the Miri part of this change can be broken out, consider making this change to rust-lang/miri instead. However, if Miri needs adjusting for rustc changes, just ignore this message.

cc @rust-lang/miri

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 15, 2026

@RalfJung RalfJung Nov 15, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miri tests do not run on powerpc so I didn't bother adding ppcf128 here.

View changes since the review

@folkertdev

Copy link
Copy Markdown
Contributor

Are there any float types I missed?

By the looks of it f16b? You could throw in a Complex<f32> too.

@RalfJung

Copy link
Copy Markdown
Member Author

By the looks of it f16b?

Ah right -- I thought it was 3 types, just didn't remember the third...

)]
pub use core::num::ZeroablePrimitive;
#[unstable(feature = "f16b", issue = "160630")]
pub use core::num::f16b;

@RalfJung RalfJung Nov 15, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it is an accident that f16b existed in core::num but not in std::num.
Cc @rust-lang/libs-ping

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say so, it's a bit subtle that you need to add it to both.

@RalfJung
RalfJung force-pushed the float-abi branch 2 times, most recently from 858e49c to ec2be6c Compare November 15, 2026 18:40
@rust-log-analyzer

This comment has been minimized.

@joshtriplett

Copy link
Copy Markdown
Member

LGTM, r=me if it passes CI.

Also, I think the new float types ought to support Default, to avoid needing workarounds like this.

@folkertdev

Copy link
Copy Markdown
Contributor

Yes, the initial PR for landing the type(s) kept that out but we fully intend to support Default. You can add it in this PR if you want.

@RalfJung

Copy link
Copy Markdown
Member Author

I actually kind of prefer not having the trait bound.

@bors r=joshtriplett

(Btw if you say @bors r+ while PR CI is still running then these days bors waits until PR C is green before adding the PR to the queue.)

@rust-bors

rust-bors Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

📌 Commit a6844d5 has been approved by joshtriplett

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 15, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Nov 16, 2026
add ABI compat checks for new float types

These types are quite special ABI-wise, let's make sure they are covered here as well.

r? @folkertdev
Are there any float types I missed?
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 16, 2026
add ABI compat checks for new float types

These types are quite special ABI-wise, let's make sure they are covered here as well.

r? @folkertdev
Are there any float types I missed?
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 16, 2026
add ABI compat checks for new float types

These types are quite special ABI-wise, let's make sure they are covered here as well.

r? @folkertdev
Are there any float types I missed?
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 16, 2026
add ABI compat checks for new float types

These types are quite special ABI-wise, let's make sure they are covered here as well.

r? @folkertdev
Are there any float types I missed?
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 16, 2026
add ABI compat checks for new float types

These types are quite special ABI-wise, let's make sure they are covered here as well.

r? @folkertdev
Are there any float types I missed?
rust-bors Bot pushed a commit that referenced this pull request Nov 16, 2026
…uwer

Rollup of 24 pull requests

Successful merges:

 - #165819 (Avoid redundant scans when extracting stage0 archives)
 - #166011 (Clean revert of recent `String::retain` changes)
 - #159805 (Implemented different with_native_path conversion methods, refactoring fs functions to utilize with_native_path, and move exists to use with_native_path)
 - #162414 (Make min/max and copysign intrinsics generic)
 - #163891 (Do not include context span when source is unavailable to render)
 - #164156 (Improve collapsed suggestions for trait impls tuples)
 - #165900 ([tiny] Tweak wording of missing `core` note)
 - #165978 (Mention `#![doc = include_str!(...)]` trick in intro page)
 - #165979 (Improve index inference diagnostics)
 - #165983 (Update `minifier-rs` dependency version to `0.5.0`)
 - #165999 (Update TPDE submodule)
 - #166005 (add ABI compat checks for new float types)
 - #165406 (Do not suggest `as_deref` for a slice pattern on `Err`)
 - #165792 (prevent optimization for input in ascii benchmarks)
 - #165936 (Enhance documentation for try_clone File implementation)
 - #165938 (`rustc_hir_typeck::upvar`: replace for loop with `.any()`)
 - #165941 (Merge `type_bf16()` with `type_f16b()`)
 - #165942 (windows: use io::const_error in get_access_mode)
 - #165946 (PassWrapper: adapt for latest round of LLVM codegen flag refactor)
 - #165956 (Document wide pointers in core::ptr module)
 - #165987 (Fix panic on non-UTF-8 command-line arguments when `RUST_BACKTRACE` is unset)
 - #165993 (pipe_subprocess test: use libtest harness)
 - #165996 (Fix(docs): Correct discard behavior in datagram peek docs)
 - #165998 (Cleanup borrowck)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 16, 2026
add ABI compat checks for new float types

These types are quite special ABI-wise, let's make sure they are covered here as well.

r? @folkertdev
Are there any float types I missed?
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 16, 2026
add ABI compat checks for new float types

These types are quite special ABI-wise, let's make sure they are covered here as well.

r? @folkertdev
Are there any float types I missed?
@RalfJung

Copy link
Copy Markdown
Member Author

@bors rollup+

@rust-bors

rust-bors Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Unknown command "rollup+". Run @bors help or go to https://bors.rust-lang.org/help to see available commands.

@RalfJung

Copy link
Copy Markdown
Member Author

@bors rollup

rust-bors Bot pushed a commit that referenced this pull request Nov 16, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #166011 (Clean revert of recent `String::retain` changes)
 - #165475 (Add a `!type` annotation to a vtable for every supertrait that is a prefix of the vtable)
 - #165881 (fix MSVC calling convention byte counts)
 - #165882 (Add a separate feature gate for EIIs with default impls)
 - #165922 (Prevent inlining of foreign items through glob reexports named `_`)
 - #165979 (Improve index inference diagnostics)
 - #165983 (Update `minifier-rs` dependency version to `0.5.0`)
 - #165613 (Handle trait default values in `mir_for_direct_const`)
 - #165677 (Rewrite relaxed bound policy code)
 - #165861 (cg_llvm: Use an invariant lifetime brand for LLVM attributes)
 - #165990 (gca fixed issue regression tests)
 - #165993 (pipe_subprocess test: use libtest harness)
 - #165998 (Cleanup borrowck)
 - #166005 (add ABI compat checks for new float types)
 - #166009 (Improve `String::insert{,_str}` safety comments)
 - #166021 (Correct and expand E0225 error explanation.)
 - #166029 (rustc-dev-guide subtree update)
 - #166031 (Split packed structs out of `const_struct`)
 - #166032 (Normalize the simd field type before reading its length)
 - #166034 (Three LLVM-type-related cleanups)
 - #166047 (Document AltiVec requirement for powerpc64-unknown-linux-gnuelfv2)
@rust-bors
rust-bors Bot merged commit 7ef4729 into rust-lang:main Nov 16, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 16, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 16, 2026
Rollup merge of #166005 - RalfJung:float-abi, r=joshtriplett

add ABI compat checks for new float types

These types are quite special ABI-wise, let's make sure they are covered here as well.

r? @folkertdev
Are there any float types I missed?
sushink70 pushed a commit to sushink70/miri that referenced this pull request Nov 17, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - rust-lang/rust#166011 (Clean revert of recent `String::retain` changes)
 - rust-lang/rust#165475 (Add a `!type` annotation to a vtable for every supertrait that is a prefix of the vtable)
 - rust-lang/rust#165881 (fix MSVC calling convention byte counts)
 - rust-lang/rust#165882 (Add a separate feature gate for EIIs with default impls)
 - rust-lang/rust#165922 (Prevent inlining of foreign items through glob reexports named `_`)
 - rust-lang/rust#165979 (Improve index inference diagnostics)
 - rust-lang/rust#165983 (Update `minifier-rs` dependency version to `0.5.0`)
 - rust-lang/rust#165613 (Handle trait default values in `mir_for_direct_const`)
 - rust-lang/rust#165677 (Rewrite relaxed bound policy code)
 - rust-lang/rust#165861 (cg_llvm: Use an invariant lifetime brand for LLVM attributes)
 - rust-lang/rust#165990 (gca fixed issue regression tests)
 - rust-lang/rust#165993 (pipe_subprocess test: use libtest harness)
 - rust-lang/rust#165998 (Cleanup borrowck)
 - rust-lang/rust#166005 (add ABI compat checks for new float types)
 - rust-lang/rust#166009 (Improve `String::insert{,_str}` safety comments)
 - rust-lang/rust#166021 (Correct and expand E0225 error explanation.)
 - rust-lang/rust#166029 (rustc-dev-guide subtree update)
 - rust-lang/rust#166031 (Split packed structs out of `const_struct`)
 - rust-lang/rust#166032 (Normalize the simd field type before reading its length)
 - rust-lang/rust#166034 (Three LLVM-type-related cleanups)
 - rust-lang/rust#166047 (Document AltiVec requirement for powerpc64-unknown-linux-gnuelfv2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants