Revert unsound libcore changes
fixes #120537
these were introduced in #119911
r? @cuviper
(rustbot has picked a reviewer for you, use r? to override)
@bors treeclosed=100 CI is stalled again.
I don't think reverting the whole thing is necessary because the unsoundness can be fixed by just adding a - 1. However, if you do decide revert it, I'll take my time rewriting it, because there are some parts that could use more attention.
@NCGThompson do you plan to submit a fix PR? If so, feel free to tag me as the reviewer, and please do include more tests of the boundary conditions, both Some and None cases.
I'd like to land this PR first so we don't end up with it in beta. Afterwards reverting this PR again and applying a fix should not be much effort
Fair enough! I'm not sure what's going to happen with beta branching around the current tree closure, but can queue it up and also beta-backport if needed.
@bors r+ rollup
:pushpin: Commit 6ac035df442a27cf9e99ab4ec25bb6147a700902 has been approved by cuviper
It is now in the queue for this repository.
:evergreen_tree: The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.
#120537 is a regression in 1.77 that this fixes (by revert).
@rustbot label +beta-nominated
Unilaterally accepting for beta backport. This is a soundness fix after all, and just a revert, so danger-free