diff options
author | Peter Jaszkowiak <p.jaszkow@gmail.com> | 2024-05-19 12:28:26 -0600 |
---|---|---|
committer | Peter Jaszkowiak <p.jaszkow@gmail.com> | 2024-07-05 16:33:58 -0600 |
commit | ffea65bf6101ddecf14787c1a29a1460320c5a91 (patch) | |
tree | a6ab8ffb7625243926a9805b9581226537eaa1e4 /tests/ui/range | |
parent | 6e2780775f5cea9328d37f4b8d0ee79db0056267 (diff) |
add `new_range_api` for RFC 3550
This includes a `From<legacy::RangeInclusive> for RangeInclusive` impl for convenience, instead of the `TryFrom` impl from the RFC.
Having `From` is highly convenient and the assertion is unlikely to be a problem in practice.
This includes re-exports of all existing `Range` types under `core::range`, plus the range-related traits (`RangeBounds`, `Step`, `OneSidedRange`) and the `Bound` enum.
Currently the iterators are just wrappers around the old range types,
and most other trait impls delegate to the old rage types as well.
Also includes an `.iter()` shorthand for `.clone().into_iter()`
Diffstat (limited to 'tests/ui/range')
-rw-r--r-- | tests/ui/range/issue-54505-no-std.stderr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/range/issue-54505-no-std.stderr b/tests/ui/range/issue-54505-no-std.stderr index 1694d514f42..f15a0ae6138 100644 --- a/tests/ui/range/issue-54505-no-std.stderr +++ b/tests/ui/range/issue-54505-no-std.stderr @@ -7,7 +7,7 @@ LL | take_range(0..1); | arguments to this function are incorrect | = note: expected reference `&_` - found struct `Range<{integer}>` + found struct `core::ops::Range<{integer}>` note: function defined here --> $DIR/issue-54505-no-std.rs:25:4 | @@ -27,7 +27,7 @@ LL | take_range(1..); | arguments to this function are incorrect | = note: expected reference `&_` - found struct `RangeFrom<{integer}>` + found struct `core::ops::RangeFrom<{integer}>` note: function defined here --> $DIR/issue-54505-no-std.rs:25:4 | @@ -67,7 +67,7 @@ LL | take_range(0..=1); | arguments to this function are incorrect | = note: expected reference `&_` - found struct `RangeInclusive<{integer}>` + found struct `core::ops::RangeInclusive<{integer}>` note: function defined here --> $DIR/issue-54505-no-std.rs:25:4 | |