Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement unstable new_range feature #136167

Merged
merged 2 commits into from
Feb 4, 2025
Merged

Implement unstable new_range feature #136167

merged 2 commits into from
Feb 4, 2025

Conversation

pitaj
Copy link
Contributor

@pitaj pitaj commented Jan 28, 2025

Switches a..b, a.., and a..=b to resolve to the new range types.

For rust-lang/rfcs#3550
Tracking issue #123741

also adds the re-export that was missed in the original implementation of new_range_api

@rustbot
Copy link
Collaborator

rustbot commented Jan 28, 2025

r? @Nadrieril

rustbot has assigned @Nadrieril.
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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 28, 2025
Copy link
Member

@Nadrieril Nadrieril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one nit.

if NEW_RANGE {
hir::LangItem::RangeInclusiveCopy
} else {
unreachable!() // Handled by lower_expr_range_closed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could you call lower_expr_range_closed here instead of in the match above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's much cleaner, good point.

@rust-log-analyzer

This comment has been minimized.

@Nadrieril
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Feb 3, 2025

📌 Commit f530a29 has been approved by Nadrieril

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 3, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 4, 2025
Rollup of 5 pull requests

Successful merges:

 - rust-lang#134777 (Enable more tests on Windows)
 - rust-lang#135621 (Move some std tests to integration tests)
 - rust-lang#135844 ( Add new tool for dumping feature status based on tidy )
 - rust-lang#136167 (Implement unstable `new_range` feature)
 - rust-lang#136334 (Extract `core::ffi` primitives to a separate (internal) module)

Failed merges:

 - rust-lang#136201 (Removed dependency on the field-offset crate, alternate approach)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d31e137 into rust-lang:master Feb 4, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 4, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 4, 2025
Rollup merge of rust-lang#136167 - pitaj:new_range, r=Nadrieril

Implement unstable `new_range` feature

Switches `a..b`, `a..`, and `a..=b` to resolve to the new range types.

For rust-lang/rfcs#3550
Tracking issue rust-lang#123741

also adds the re-export that was missed in the original implementation of `new_range_api`
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

5 participants