Skip to content

Conversation

bjoernager
Copy link
Contributor

@bjoernager bjoernager commented Sep 7, 2025

Tracking issue: #116909.

This PR implements core::iter::{Sum, Product} for f16 and f128.

I'm curious as to why these two traits aren't already implemented. I've been unable to find any information about it at all, so if there is anything that currently blocks them, I would appreciate if someone could fill me in.

@rustbot
Copy link
Collaborator

rustbot commented Sep 7, 2025

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 7, 2025
@bjoernager
Copy link
Contributor Author

@rustbot label +T-libs-api -T-libs

r? libs-api

@rustbot rustbot added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 7, 2025
@rustbot rustbot assigned the8472 and unassigned jhpratt Sep 7, 2025
@tgross35
Copy link
Contributor

tgross35 commented Sep 7, 2025

Afaik this is probably just an oversight. I don't expect there to be problems; however, we have had a number of inference regressions related to trait implementations on these types, so we should be safe and crater.

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 7, 2025
Implement `Sum` and `Product` for `f16` and `f128`.
@rust-bors
Copy link

rust-bors bot commented Sep 7, 2025

☀️ Try build successful (CI)
Build commit: 8384de5 (8384de5d92dd9b1c0b67caa5c1c1b11bf606490f, parent: 55b9b4d1e1bb5b46c04237a2fb2f8a85f39ef97d)

@jhpratt
Copy link
Member

jhpratt commented Sep 7, 2025

Agreed this is an oversight. The new floating point types have some holes in them and I don't believe anyone has ever exhaustively checked the APIs to see what those might be. This certainly doesn't need team approval, not the least because the types themselves are unstable.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 7, 2025

📌 Commit 02602ef has been approved by jhpratt

It is now in the queue for this repository.

@bors bors 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 Sep 7, 2025
@tgross35
Copy link
Contributor

tgross35 commented Sep 7, 2025

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-146300 created and queued.
🤖 Automatically detected try build 8384de5
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 7, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 8, 2025
…=jhpratt

Implement `Sum` and `Product` for `f16` and `f128`.

Tracking issue: rust-lang#116909.

This PR implements `core::iter::{Sum, Product}` for `f16` and `f128`.

I'm curious as to why these two traits aren't already implemented. I've been unable to find any information about it at all, so if there is anything that currently blocks them, I would appreciate if someone could fill me in.
bors added a commit that referenced this pull request Sep 8, 2025
Rollup of 5 pull requests

Successful merges:

 - #144549 (match clang's `va_arg` assembly on arm targets)
 - #146184 (In the rustc_llvm build script, don't consider arm64* to be 32-bit)
 - #146298 (GVN: Ensure indirect is first projection in try_as_place.)
 - #146299 (docs(std): add error docs for path canonicalize)
 - #146300 (Implement `Sum` and `Product` for `f16` and `f128`.)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Sep 8, 2025
…=jhpratt

Implement `Sum` and `Product` for `f16` and `f128`.

Tracking issue: rust-lang#116909.

This PR implements `core::iter::{Sum, Product}` for `f16` and `f128`.

I'm curious as to why these two traits aren't already implemented. I've been unable to find any information about it at all, so if there is anything that currently blocks them, I would appreciate if someone could fill me in.
bors added a commit that referenced this pull request Sep 8, 2025
Rollup of 11 pull requests

Successful merges:

 - #145177 (std: move `thread` into `sys`)
 - #146018 (compiler: Add Windows resources to rustc-main and rustc_driver)
 - #146025 (compiler: Include span of too huge array with `-Cdebuginfo=2`)
 - #146184 (In the rustc_llvm build script, don't consider arm64* to be 32-bit)
 - #146195 (fix partial urlencoded link support)
 - #146300 (Implement `Sum` and `Product` for `f16` and `f128`.)
 - #146314 (mark `format_args_nl!` as `#[doc(hidden)]`)
 - #146324 (const-eval: disable pointer fragment support)
 - #146326 (simplify the declaration of the legacy integer modules (`std::u32` etc.))
 - #146339 (Update books)
 - #146343 (Weakly export `platform_version` symbols)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 9, 2025
Rollup of 11 pull requests

Successful merges:

 - #139593 (add sitemap to rust docs)
 - #145819 (Port limit attributes to the new attribute parsing infrastructure)
 - #146025 (compiler: Include span of too huge array with `-Cdebuginfo=2`)
 - #146184 (In the rustc_llvm build script, don't consider arm64* to be 32-bit)
 - #146195 (fix partial urlencoded link support)
 - #146300 (Implement `Sum` and `Product` for `f16` and `f128`.)
 - #146314 (mark `format_args_nl!` as `#[doc(hidden)]`)
 - #146324 (const-eval: disable pointer fragment support)
 - #146326 (simplify the declaration of the legacy integer modules (`std::u32` etc.))
 - #146339 (Update books)
 - #146343 (Weakly export `platform_version` symbols)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 9, 2025
Rollup of 11 pull requests

Successful merges:

 - #139593 (add sitemap to rust docs)
 - #145819 (Port limit attributes to the new attribute parsing infrastructure)
 - #146025 (compiler: Include span of too huge array with `-Cdebuginfo=2`)
 - #146184 (In the rustc_llvm build script, don't consider arm64* to be 32-bit)
 - #146195 (fix partial urlencoded link support)
 - #146300 (Implement `Sum` and `Product` for `f16` and `f128`.)
 - #146314 (mark `format_args_nl!` as `#[doc(hidden)]`)
 - #146324 (const-eval: disable pointer fragment support)
 - #146326 (simplify the declaration of the legacy integer modules (`std::u32` etc.))
 - #146339 (Update books)
 - #146343 (Weakly export `platform_version` symbols)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5985779 into rust-lang:master Sep 9, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Sep 9, 2025
rust-timer added a commit that referenced this pull request Sep 9, 2025
Rollup merge of #146300 - bjoernager:f16-f128-sum-product, r=jhpratt

Implement `Sum` and `Product` for `f16` and `f128`.

Tracking issue: #116909.

This PR implements `core::iter::{Sum, Product}` for `f16` and `f128`.

I'm curious as to why these two traits aren't already implemented. I've been unable to find any information about it at all, so if there is anything that currently blocks them, I would appreciate if someone could fill me in.
@craterbot
Copy link
Collaborator

🚧 Experiment pr-146300 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Sep 11, 2025
…=jhpratt

Implement `Sum` and `Product` for `f16` and `f128`.

Tracking issue: rust-lang#116909.

This PR implements `core::iter::{Sum, Product}` for `f16` and `f128`.

I'm curious as to why these two traits aren't already implemented. I've been unable to find any information about it at all, so if there is anything that currently blocks them, I would appreciate if someone could fill me in.
@craterbot
Copy link
Collaborator

🎉 Experiment pr-146300 is completed!
📊 0 regressed and 3 fixed (695840 total)
📊 1589 spurious results on the retry-regessed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-146300/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants