Stabilize core::range::{legacy, RangeFull, RangeTo}#156629
Conversation
|
r? @nnethercote rustbot has assigned @nnethercote. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
r? libs This API isn't covered by the FCP on the tracking issue: @rustbot label +I-libs-api-nominated |
This comment has been minimized.
This comment has been minimized.
66c5493 to
8d9f3da
Compare
This comment has been minimized.
This comment has been minimized.
|
@rfcbot merge libs-api |
|
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. |
|
r=me with CI fixed @rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
8d9f3da to
b909841
Compare
|
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. |
Newly stable API:
core::range::legacy
Stabilized under `new_range_api_exports`. Newly stable API:
core::range::RangeFull;
core::range::RangeTo;
b909841 to
1c8c2e5
Compare
|
Rebased and blessed the needed test. @bors r=Mark-Simulacrum |
…ns, r=Mark-Simulacrum
Stabilize `core::range::{legacy, RangeFull, RangeTo}`
Stabilize `core::range::legacy` and the re-exports of unchanged range types, so all range types can now be imported from within `core::range`. Newly stable API:
```rust
use core::range::RangeFull;
use core::range::RangeTo;
use core::range::legacy::{Range, RangeFrom, RangeInclusive, RangeToInclusive};
```
Compared to what is in the comment, I made a few exclusions:
1. At rust-lang#125687 (comment), @sendittothenewts suggested not to stabilize `core::range::RangeBounds` in case we want to reuse that name for a replacement based on `IntoBounds`. I have excluded it here so we can discuss further. `range_into_bounds` tracking issue: rust-lang#136903
2. `one_sided_range` types should probably just move into this module rather than being exported, since they are unstable. Added an unresolved question at rust-lang#69780.
3. Similarly, `step_trait ` is unstable so we could just move `crate::iter::Step` if `core::range` is a better home. Added an unresolved question at rust-lang#42168.
Since this is the last thing in `new_range_api` that isn't tracked elsewhere:
Closes: rust-lang#125687
Rollup of 31 pull requests Successful merges: - #141030 (Expand free alias types during variance computation) - #154853 (mgca: Register `ConstArgHasType` when normalizing projection consts) - #155527 (Replace printables table with `unicode_data.rs` tables) - #156629 (Stabilize `core::range::{legacy, RangeFull, RangeTo}`) - #157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - #157282 (Fix post-monomorphization error note race in the parallel frontend) - #157352 (Make the retained dep graph deterministic under the parallel frontend) - #157601 (Emit error for unused target expression in glob and list delegations) - #157611 (Update `browser-ui-test` version to `0.24.0`) - #157620 (Add a strategy FnMut to inject behavior into the flush cycle) - #157645 (Windows TLS - Only register the `atexit` hook when `cleanup` can be unloaded) - #157646 (Keep rename-imported main alive in dead-code analysis under `--test`) - #157647 (Start using comptime for reflection intrinsics and their wrapper functions) - #157719 (resolve: Partially revert "Remove a special case for dummy imports") - #155153 (Ensure Send/Sync is not implemented for std::env::Vars{,Os}) - #155198 (fix(mgca): Allow specifying generic args (of enum) on enum itself in unit & tuple variant constructions in (direct) const args) - #155323 (refactor `TypeRelativePath::AssocItem` to use `AliasTerm`) - #156497 (fix-155516: Don't suggest wrong unwrap expect) - #156583 (Support defaults for static EIIs) - #157013 (Ensure inferred let pattern types are well-formed) - #157196 (Only suggest reborrowing a moved value where the reborrow is valid) - #157230 (borrowck: avoid ICE describing fields on generic params) - #157288 (platform support: add SNaN erratum to MIPS targets) - #157330 (remove `IsTypeConst` from `hir::TraitItemKind`) - #157350 (compiletest: ignore SVG `y` offset in by-lines comparison) - #157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - #157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used in `dyn + dyn`) - #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - #157691 (Move symbol hiding code to a new file) - #157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - #157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - #157699 (Arg splat experiment - hir FnDecl impl)
Rollup merge of #156629 - tgross35:range-module-stabilizations, r=Mark-Simulacrum Stabilize `core::range::{legacy, RangeFull, RangeTo}` Stabilize `core::range::legacy` and the re-exports of unchanged range types, so all range types can now be imported from within `core::range`. Newly stable API: ```rust use core::range::RangeFull; use core::range::RangeTo; use core::range::legacy::{Range, RangeFrom, RangeInclusive, RangeToInclusive}; ``` Compared to what is in the comment, I made a few exclusions: 1. At #125687 (comment), @sendittothenewts suggested not to stabilize `core::range::RangeBounds` in case we want to reuse that name for a replacement based on `IntoBounds`. I have excluded it here so we can discuss further. `range_into_bounds` tracking issue: #136903 2. `one_sided_range` types should probably just move into this module rather than being exported, since they are unstable. Added an unresolved question at #69780. 3. Similarly, `step_trait ` is unstable so we could just move `crate::iter::Step` if `core::range` is a better home. Added an unresolved question at #42168. Since this is the last thing in `new_range_api` that isn't tracked elsewhere: Closes: #125687
Rollup of 31 pull requests Successful merges: - rust-lang#141030 (Expand free alias types during variance computation) - rust-lang#154853 (mgca: Register `ConstArgHasType` when normalizing projection consts) - rust-lang#155527 (Replace printables table with `unicode_data.rs` tables) - rust-lang#156629 (Stabilize `core::range::{legacy, RangeFull, RangeTo}`) - rust-lang#157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - rust-lang#157282 (Fix post-monomorphization error note race in the parallel frontend) - rust-lang#157352 (Make the retained dep graph deterministic under the parallel frontend) - rust-lang#157601 (Emit error for unused target expression in glob and list delegations) - rust-lang#157611 (Update `browser-ui-test` version to `0.24.0`) - rust-lang#157620 (Add a strategy FnMut to inject behavior into the flush cycle) - rust-lang#157645 (Windows TLS - Only register the `atexit` hook when `cleanup` can be unloaded) - rust-lang#157646 (Keep rename-imported main alive in dead-code analysis under `--test`) - rust-lang#157647 (Start using comptime for reflection intrinsics and their wrapper functions) - rust-lang#157719 (resolve: Partially revert "Remove a special case for dummy imports") - rust-lang#155153 (Ensure Send/Sync is not implemented for std::env::Vars{,Os}) - rust-lang#155198 (fix(mgca): Allow specifying generic args (of enum) on enum itself in unit & tuple variant constructions in (direct) const args) - rust-lang#155323 (refactor `TypeRelativePath::AssocItem` to use `AliasTerm`) - rust-lang#156497 (fix-155516: Don't suggest wrong unwrap expect) - rust-lang#156583 (Support defaults for static EIIs) - rust-lang#157013 (Ensure inferred let pattern types are well-formed) - rust-lang#157196 (Only suggest reborrowing a moved value where the reborrow is valid) - rust-lang#157230 (borrowck: avoid ICE describing fields on generic params) - rust-lang#157288 (platform support: add SNaN erratum to MIPS targets) - rust-lang#157330 (remove `IsTypeConst` from `hir::TraitItemKind`) - rust-lang#157350 (compiletest: ignore SVG `y` offset in by-lines comparison) - rust-lang#157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - rust-lang#157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used in `dyn + dyn`) - rust-lang#157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - rust-lang#157691 (Move symbol hiding code to a new file) - rust-lang#157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - rust-lang#157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - rust-lang#157699 (Arg splat experiment - hir FnDecl impl)
Rollup of 31 pull requests Successful merges: - rust-lang#141030 (Expand free alias types during variance computation) - rust-lang#154853 (mgca: Register `ConstArgHasType` when normalizing projection consts) - rust-lang#155527 (Replace printables table with `unicode_data.rs` tables) - rust-lang#156629 (Stabilize `core::range::{legacy, RangeFull, RangeTo}`) - rust-lang#157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - rust-lang#157282 (Fix post-monomorphization error note race in the parallel frontend) - rust-lang#157352 (Make the retained dep graph deterministic under the parallel frontend) - rust-lang#157601 (Emit error for unused target expression in glob and list delegations) - rust-lang#157611 (Update `browser-ui-test` version to `0.24.0`) - rust-lang#157620 (Add a strategy FnMut to inject behavior into the flush cycle) - rust-lang#157645 (Windows TLS - Only register the `atexit` hook when `cleanup` can be unloaded) - rust-lang#157646 (Keep rename-imported main alive in dead-code analysis under `--test`) - rust-lang#157647 (Start using comptime for reflection intrinsics and their wrapper functions) - rust-lang#157719 (resolve: Partially revert "Remove a special case for dummy imports") - rust-lang#155153 (Ensure Send/Sync is not implemented for std::env::Vars{,Os}) - rust-lang#155198 (fix(mgca): Allow specifying generic args (of enum) on enum itself in unit & tuple variant constructions in (direct) const args) - rust-lang#155323 (refactor `TypeRelativePath::AssocItem` to use `AliasTerm`) - rust-lang#156497 (fix-155516: Don't suggest wrong unwrap expect) - rust-lang#156583 (Support defaults for static EIIs) - rust-lang#157013 (Ensure inferred let pattern types are well-formed) - rust-lang#157196 (Only suggest reborrowing a moved value where the reborrow is valid) - rust-lang#157230 (borrowck: avoid ICE describing fields on generic params) - rust-lang#157288 (platform support: add SNaN erratum to MIPS targets) - rust-lang#157330 (remove `IsTypeConst` from `hir::TraitItemKind`) - rust-lang#157350 (compiletest: ignore SVG `y` offset in by-lines comparison) - rust-lang#157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - rust-lang#157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used in `dyn + dyn`) - rust-lang#157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - rust-lang#157691 (Move symbol hiding code to a new file) - rust-lang#157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - rust-lang#157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - rust-lang#157699 (Arg splat experiment - hir FnDecl impl)
Stabilize
core::range::legacyand the re-exports of unchanged range types, so all range types can now be imported from withincore::range. Newly stable API:Compared to what is in the comment, I made a few exclusions:
new_range_api(part of RFC 3550) #125687 (comment), @sendittothenewts suggested not to stabilizecore::range::RangeBoundsin case we want to reuse that name for a replacement based onIntoBounds. I have excluded it here so we can discuss further.range_into_boundstracking issue: Tracking Issue forrange_into_bounds#136903one_sided_rangetypes should probably just move into this module rather than being exported, since they are unstable. Added an unresolved question at Tracking Issue for OneSidedRange #69780.step_traitis unstable so we could just movecrate::iter::Stepifcore::rangeis a better home. Added an unresolved question at Tracking issue forstep_traitstabilization #42168.Since this is the last thing in
new_range_apithat isn't tracked elsewhere:Closes: #125687
Cc @pitaj