@@ -128,7 +128,7 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
128
128
/// The range is empty if either side is incomparable:
129
129
///
130
130
/// ```
131
- /// #![feature(range_is_empty,inclusive_range_syntax )]
131
+ /// #![feature(range_is_empty)]
132
132
///
133
133
/// use std::f32::NAN;
134
134
/// assert!(!(3.0..5.0).is_empty());
@@ -283,8 +283,6 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
283
283
/// # Examples
284
284
///
285
285
/// ```
286
- /// #![feature(inclusive_range_syntax)]
287
- ///
288
286
/// assert_eq!((3..=5), std::ops::RangeInclusive { start: 3, end: 5 });
289
287
/// assert_eq!(3 + 4 + 5, (3..=5).sum());
290
288
///
@@ -316,7 +314,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
316
314
/// # Examples
317
315
///
318
316
/// ```
319
- /// #![feature(range_contains,inclusive_range_syntax )]
317
+ /// #![feature(range_contains)]
320
318
///
321
319
/// assert!(!(3..=5).contains(2));
322
320
/// assert!( (3..=5).contains(3));
@@ -337,7 +335,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
337
335
/// # Examples
338
336
///
339
337
/// ```
340
- /// #![feature(range_is_empty,inclusive_range_syntax )]
338
+ /// #![feature(range_is_empty)]
341
339
///
342
340
/// assert!(!(3..=5).is_empty());
343
341
/// assert!(!(3..=3).is_empty());
@@ -347,7 +345,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
347
345
/// The range is empty if either side is incomparable:
348
346
///
349
347
/// ```
350
- /// #![feature(range_is_empty,inclusive_range_syntax )]
348
+ /// #![feature(range_is_empty)]
351
349
///
352
350
/// use std::f32::NAN;
353
351
/// assert!(!(3.0..=5.0).is_empty());
@@ -358,7 +356,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
358
356
/// This method returns `true` after iteration has finished:
359
357
///
360
358
/// ```
361
- /// #![feature(range_is_empty,inclusive_range_syntax )]
359
+ /// #![feature(range_is_empty)]
362
360
///
363
361
/// let mut r = 3..=5;
364
362
/// for _ in r.by_ref() {}
@@ -381,16 +379,13 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
381
379
/// The `..=end` syntax is a `RangeToInclusive`:
382
380
///
383
381
/// ```
384
- /// #![feature(inclusive_range_syntax)]
385
382
/// assert_eq!((..=5), std::ops::RangeToInclusive{ end: 5 });
386
383
/// ```
387
384
///
388
385
/// It does not have an [`IntoIterator`] implementation, so you can't use it in a
389
386
/// `for` loop directly. This won't compile:
390
387
///
391
388
/// ```compile_fail,E0277
392
- /// #![feature(inclusive_range_syntax)]
393
- ///
394
389
/// // error[E0277]: the trait bound `std::ops::RangeToInclusive<{integer}>:
395
390
/// // std::iter::Iterator` is not satisfied
396
391
/// for i in ..=5 {
@@ -402,8 +397,6 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
402
397
/// array elements up to and including the index indicated by `end`.
403
398
///
404
399
/// ```
405
- /// #![feature(inclusive_range_syntax)]
406
- ///
407
400
/// let arr = [0, 1, 2, 3];
408
401
/// assert_eq!(arr[ ..=2], [0,1,2 ]); // RangeToInclusive
409
402
/// assert_eq!(arr[1..=2], [ 1,2 ]);
@@ -434,7 +427,7 @@ impl<Idx: PartialOrd<Idx>> RangeToInclusive<Idx> {
434
427
/// # Examples
435
428
///
436
429
/// ```
437
- /// #![feature(range_contains,inclusive_range_syntax )]
430
+ /// #![feature(range_contains)]
438
431
///
439
432
/// assert!( (..=5).contains(-1_000_000_000));
440
433
/// assert!( (..=5).contains(5));
0 commit comments