Revert const hacks and use const closures in std#155957
Revert const hacks and use const closures in std#155957oli-obk wants to merge 2 commits intorust-lang:mainfrom
Conversation
|
r? @jhpratt rustbot has assigned @jhpratt. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
Does this fix #155781? |
|
I'm pretty sure it will |
| F: [const] FnMut(usize) -> T + [const] Destruct, | ||
| { | ||
| try_from_fn(NeverShortCircuit::wrap_mut_1(f)).0 | ||
| try_from_fn(const move |a| NeverShortCircuit(f(a))).0 |
There was a problem hiding this comment.
Yea, the Wrapped type was only used in these two cases
| debug_assert!(elem_layout.size() == elem_layout.pad_to_align().size()); | ||
|
|
||
| // FIXME(const-hack) return to using `map` and `map_err` once `const_closures` is implemented | ||
| match elem_layout.repeat_packed(cap) { |
There was a problem hiding this comment.
why isn't it repeat_packed?
There was a problem hiding this comment.
I think this was a very recent change and I messed up a rebase over it, fixed
9b213cb to
3b0794b
Compare
oh. yes! I ran into this issue but didn't realize there was an issue open for it |
|
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. |
|
@bors r=jhpratt |
|
@bors rollup |
Revert const hacks and use const closures in std This revealed some smaller bugs in stability checking that I fixed where needed: * const closures use the const stability of their parent * trait method default bodies use the const stability of their trait Otherwise trivial reverts of the const hacks that were added fixes rust-lang#155781
|
Not sure how this PR causes it, but the other 2 PRs in the rollup seem even less likely |
|
This pull request was unapproved. This PR was contained in a rollup (#156108), which was unapproved. |
This comment has been minimized.
This comment has been minimized.
Revert const hacks and use const closures in std try-job: dist-i586-gnu-i586-i686-musl
| { | ||
| // FIXME(const-hack): revert this to a const closure | ||
| #[rustc_const_unstable(feature = "const_iter", issue = "92476")] | ||
| #[rustc_inherit_overflow_checks] |
There was a problem hiding this comment.
Right probably caused by the removal of rustc_inherit_overflow_checks
|
💔 Test for 6389d03 failed: CI. Failed job:
|
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This revealed some smaller bugs in stability checking that I fixed where needed:
Otherwise trivial reverts of the const hacks that were added
fixes #155781