Constify MapWhile - #161519
Constify MapWhile#161519Randl wants to merge 2 commits into
Conversation
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
b8d04aa to
b63af16
Compare
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
b63af16 to
a7955ea
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
There was a problem hiding this comment.
Thank you for the interest! However, this falls under changes we don't want prior to a const trait RFC #155816:
Giving nightly users more const API is not sufficient reason to constify a trait or impl at this time, nor is checking off impls from a list.
|
Reminder, once the PR becomes ready for a review, use |
|
Motivation is to constify I didn't want to make change to macro without using it anywhere, but I also didn't want constifying one of the bigger adapters in the same PR. I can do either if that's preferable @tgross35 |
|
Oh, I wasn't aware of that, sorry. r? tgross35 for further review |
|
|
|
ping @tgross35 |
So, this is specifically one of the things forbidden by the policy. We need a few methods in This change is small, but the policy exists largely because small changes add up. I don't think there is any reason to merge this before an accepted const trait RFC, so: @rustbot blocked |
|
I see Since A separate question is whether we're comfortable with stabilizing const traits while keeping |
Before having an RFC, we're not trying to judge
I don't know if it's a hack as much as lack of syntax, we'll probably have a way to do that eventually. I'm not concerned about using it because we'd likely want to keep the door open for methods that can't be |
This is part of an attempt to fully constify
Iterator. Specifically, I'm extracting the changes from the local branch that contains more or less minimal Iterator constification. While MapWhile itself is not very important, it is a good way to make sureimpl_fold_via_try_foldworks properly with const.