Constify fold, reduce and last for iterator#151899
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Apr 6, 2026
Merged
Constify fold, reduce and last for iterator#151899rust-bors[bot] merged 1 commit intorust-lang:mainfrom
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
Collaborator
Contributor
|
I think we should hold off here until at least |
Contributor
Author
|
Not sure I follow? rust/library/core/src/option.rs Lines 2476 to 2483 in 1e9be1b |
This comment was marked as resolved.
This comment was marked as resolved.
Contributor
Author
|
ping @tgross35 |
Contributor
Author
|
@rustbot reroll |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 6, 2026
Constify fold, reduce and last for iterator These functions only require the addition of `[const]` in appropriate places, so it feels like almost a trivial change. Most of the others require either consitifying additional traits, const closures, or both.
This was referenced Apr 6, 2026
rust-bors bot
pushed a commit
that referenced
this pull request
Apr 6, 2026
…uwer Rollup of 9 pull requests Successful merges: - #153440 (Various LTO cleanups) - #151899 (Constify fold, reduce and last for iterator) - #154561 (Suggest similar keyword when visibility is not followed by an item) - #154657 (Fix pattern assignment suggestions for uninitialized bindings) - #154717 (Fix ICE in unsafe binder discriminant helpers) - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message) - #154777 (`#[cfg]`: suggest alternative `target_` name when the value does not match) - #154849 (Promote `char::is_case_ignorable` from perma-unstable to unstable) - #154850 (ast_validation: scalable vectors okay for rustdoc)
rust-timer
added a commit
that referenced
this pull request
Apr 6, 2026
Rollup merge of #151899 - Randl:const-iter-fold, r=oli-obk Constify fold, reduce and last for iterator These functions only require the addition of `[const]` in appropriate places, so it feels like almost a trivial change. Most of the others require either consitifying additional traits, const closures, or both.
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Apr 7, 2026
…uwer Rollup of 9 pull requests Successful merges: - rust-lang/rust#153440 (Various LTO cleanups) - rust-lang/rust#151899 (Constify fold, reduce and last for iterator) - rust-lang/rust#154561 (Suggest similar keyword when visibility is not followed by an item) - rust-lang/rust#154657 (Fix pattern assignment suggestions for uninitialized bindings) - rust-lang/rust#154717 (Fix ICE in unsafe binder discriminant helpers) - rust-lang/rust#154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message) - rust-lang/rust#154777 (`#[cfg]`: suggest alternative `target_` name when the value does not match) - rust-lang/rust#154849 (Promote `char::is_case_ignorable` from perma-unstable to unstable) - rust-lang/rust#154850 (ast_validation: scalable vectors okay for rustdoc)
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.
These functions only require the addition of
[const]in appropriate places, so it feels like almost a trivial change. Most of the others require either consitifying additional traits, const closures, or both.