You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Change any trait bounds that assume `Range*: Iterator` to use `IntoIterator` instead
167
+
- Change any trait bounds that assume `Range*: Iterator` to use `IntoIterator` instead
168
168
This is fully backwards-compatible, thanks to the [blanket `impl<I: Iterator> IntoIterator for I`](https://doc.rust-lang.org/stable/std/iter/trait.IntoIterator.html#impl-IntoIterator-for-I)
169
169
170
170
```rust
@@ -242,7 +242,7 @@ The [**Range Expressions** page in the Reference](https://doc.rust-lang.org/refe
242
242
> ## Edition 2024 and later
243
243
>
244
244
> The `..` and `..=` operators will construct an object of one of the `std::range::Range` (or `core::range::Range`) variants, according to the following table:
> |_RangeInclusiveExpr_| start`..=`end | std::range::RangeInclusive | start ≤ x ≤ end |
253
253
> |_RangeToInclusiveExpr_|`..=`end | std::range::RangeToInclusive | x ≤ end |
254
-
>
254
+
>
255
255
> **Note:** While `std::ops::RangeTo`, `std::ops::RangeFull`, and `std::ops::RangeToInclusive` are re-exports of `std::range::RangeTo`, `std::range::RangeFull`, and `std::ops::Range::RangeToInclusive` respectively, `std::ops::Range`, `std::ops::RangeFrom`, and `std::ops::RangeInclusive` are re-exports of the types under `std::range::legacy::` (NOT those directly under `std::range::`) for backwards-compatibility reasons.
256
-
>
256
+
>
257
257
> Examples:
258
-
>
258
+
>
259
259
> ```rust
260
260
> 1..2; // std::range::Range
261
261
> 3..; // std::range::RangeFrom
@@ -266,18 +266,18 @@ The [**Range Expressions** page in the Reference](https://doc.rust-lang.org/refe
266
266
> ```
267
267
>
268
268
> Thefollowingexpressionsareequivalent.
269
-
>
269
+
>
270
270
> ```rust
271
271
> letx=std::range::Range {start:0, end:10};
272
272
> lety=0..10;
273
-
>
273
+
>
274
274
> assert_eq!(x, y);
275
275
> ```
276
276
>
277
277
> ## PriortoEdition2024
278
278
>
279
279
> The `..` and `..=` operatorswillconstructanobjectofoneofthe `std::range::legacy::Range` (or `core::range::legacy::Range`) variants, accordingtothefollowingtable:
0 commit comments