Skip to content

Document panic in RangeInclusive::from(legacy::RangeInclusive)#155421

Open
tbu- wants to merge 1 commit intorust-lang:mainfrom
tbu-:pr_rangeinclusive_from_panic
Open

Document panic in RangeInclusive::from(legacy::RangeInclusive)#155421
tbu- wants to merge 1 commit intorust-lang:mainfrom
tbu-:pr_rangeinclusive_from_panic

Conversation

@tbu-
Copy link
Copy Markdown
Contributor

@tbu- tbu- commented Apr 17, 2026

No description provided.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 17, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 17, 2026

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @scottmcm, libs
  • @scottmcm, libs expanded to 7 candidates
  • Random selection from Mark-Simulacrum, jhpratt, scottmcm

@jhpratt
Copy link
Copy Markdown
Member

jhpratt commented Apr 17, 2026

Has this been approved by T-libs-api? The panic message clearly says unspecified, so adding this documentation would overrule that.

@tbu-
Copy link
Copy Markdown
Contributor Author

tbu- commented Apr 17, 2026

If T-libs doesn't want to guarantee this, I can change the wording to "currently panics, may not panic in the future". Or even "may panic".

@rust-log-analyzer

This comment has been minimized.

@tbu- tbu- force-pushed the pr_rangeinclusive_from_panic branch from 766773c to f43e3e7 Compare April 17, 2026 08:35
@fmease
Copy link
Copy Markdown
Member

fmease commented Apr 17, 2026

#155394

@rust-log-analyzer

This comment has been minimized.

@Amanieu
Copy link
Copy Markdown
Member

Amanieu commented Apr 27, 2026

ping @tbu-, CI is failing. You need to add #![feature(new_range_api_legacy)] to the doc tests or import the old range types from core::ops instead.

@tbu- tbu- force-pushed the pr_rangeinclusive_from_panic branch from f43e3e7 to 73b9155 Compare April 28, 2026 13:53
@rust-log-analyzer

This comment has been minimized.

@tbu- tbu- force-pushed the pr_rangeinclusive_from_panic branch from 73b9155 to 70df721 Compare April 28, 2026 15:08
@tbu-
Copy link
Copy Markdown
Contributor Author

tbu- commented Apr 28, 2026

Thanks for the ping, @Amanieu. I somehow forgot about this PR.

@rust-log-analyzer

This comment has been minimized.

@tbu- tbu- force-pushed the pr_rangeinclusive_from_panic branch from 70df721 to 6502d57 Compare April 28, 2026 19:50
@rust-log-analyzer

This comment has been minimized.

@tbu- tbu- force-pushed the pr_rangeinclusive_from_panic branch from 6502d57 to 5a00cc6 Compare April 28, 2026 21:14
@theemathas
Copy link
Copy Markdown
Contributor

Note: The current status of the PR adds a new stable guarantee that the conversion will panic for an exhausted iterator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants