Weaken guarantee for From<legacy::RangeInclusive> for RangeInclusive#158770
Weaken guarantee for From<legacy::RangeInclusive> for RangeInclusive#158770theemathas wants to merge 2 commits into
From<legacy::RangeInclusive> for RangeInclusive#158770Conversation
As per rust-lang#155114 (comment), this `From` impl no longer guarantees panicking for exhausted iterators. Instead, it only guarantees that the conversion will either panic or produce an empty range. This is done so that we can optimize the implementation of `legacy::RangeInclusive` in a way such that we cannot check if it has been exhausted in a generic context without a `Step` and/or `PartialOrd` bound.
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
(not beta-nominated but if the promotion happens meanwhile, please add the label) |
…=JohnTitor Weaken guarantee for `From<legacy::RangeInclusive> for RangeInclusive` As per rust-lang#155114 (comment), this `From` impl no longer guarantees panicking for exhausted iterators. Instead, it only guarantees that the conversion will either panic or produce an empty range. This is done so that we can optimize the implementation of `legacy::RangeInclusive` in a way such that we cannot check if it has been exhausted in a generic context without a `Step` and/or `PartialOrd` bound. If this PR and/or rust-lang#155114 merges after the 1.98.0 beta branch promotion from the main branch, then this will need a beta backport, since this PR changes the stable guarantee previously made in rust-lang#155421. This PR conflicts with and/or blocks rust-lang#155114.
|
@bors try jobs=test-various |
This comment has been minimized.
This comment has been minimized.
Weaken guarantee for `From<legacy::RangeInclusive> for RangeInclusive` try-job: test-various
|
💔 Test for e35034e failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
|
Does |
|
@bors r- |
|
This pull request was unapproved. This PR was contained in a rollup (#158806), which was unapproved. |
|
The test failed because |
|
@bors try |
This comment has been minimized.
This comment has been minimized.
Weaken guarantee for `From<legacy::RangeInclusive> for RangeInclusive`
As per #155114 (comment), this
Fromimpl no longer guarantees panicking for exhausted iterators. Instead, it only guarantees that the conversion will either panic or produce an empty range.This is done so that we can optimize the implementation of
legacy::RangeInclusivein a way such that we cannot check if it has been exhausted in a generic context without aStepand/orPartialOrdbound.If this PR and/or #155114 merges after the 1.98.0 beta branch promotion from the main branch, then this will need a beta backport, since this PR changes the stable guarantee previously made in #155421.
This PR conflicts with and/or blocks #155114.