@@ -241,22 +241,22 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
241241 }
242242}
243243
244- /// An range bounded inclusively below and above (`start... end`).
244+ /// An range bounded inclusively below and above (`start..= end`).
245245///
246- /// The `RangeInclusive` `start... end` contains all values with `x >= start`
246+ /// The `RangeInclusive` `start..= end` contains all values with `x >= start`
247247/// and `x <= end`.
248248///
249249/// # Examples
250250///
251251/// ```
252252/// #![feature(inclusive_range,inclusive_range_syntax)]
253253///
254- /// assert_eq!((3... 5), std::ops::RangeInclusive { start: 3, end: 5 });
255- /// assert_eq!(3 + 4 + 5, (3... 5).sum());
254+ /// assert_eq!((3..= 5), std::ops::RangeInclusive { start: 3, end: 5 });
255+ /// assert_eq!(3 + 4 + 5, (3..= 5).sum());
256256///
257257/// let arr = [0, 1, 2, 3];
258- /// assert_eq!(arr[ ... 2], [0,1,2 ]);
259- /// assert_eq!(arr[1... 2], [ 1,2 ]); // RangeInclusive
258+ /// assert_eq!(arr[ ..= 2], [0,1,2 ]);
259+ /// assert_eq!(arr[1..= 2], [ 1,2 ]); // RangeInclusive
260260/// ```
261261#[ derive( Clone , PartialEq , Eq , Hash ) ] // not Copy -- see #27186
262262#[ unstable( feature = "inclusive_range" , reason = "recently added, follows RFC" , issue = "28237" ) ]
@@ -276,7 +276,7 @@ pub struct RangeInclusive<Idx> {
276276#[ unstable( feature = "inclusive_range" , reason = "recently added, follows RFC" , issue = "28237" ) ]
277277impl < Idx : fmt:: Debug > fmt:: Debug for RangeInclusive < Idx > {
278278 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
279- write ! ( fmt, "{:?}... {:?}" , self . start, self . end)
279+ write ! ( fmt, "{:?}..= {:?}" , self . start, self . end)
280280 }
281281}
282282
@@ -289,32 +289,32 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
289289 /// ```
290290 /// #![feature(range_contains,inclusive_range_syntax)]
291291 ///
292- /// assert!(!(3... 5).contains(2));
293- /// assert!( (3... 5).contains(3));
294- /// assert!( (3... 5).contains(4));
295- /// assert!( (3... 5).contains(5));
296- /// assert!(!(3... 5).contains(6));
292+ /// assert!(!(3..= 5).contains(2));
293+ /// assert!( (3..= 5).contains(3));
294+ /// assert!( (3..= 5).contains(4));
295+ /// assert!( (3..= 5).contains(5));
296+ /// assert!(!(3..= 5).contains(6));
297297 ///
298- /// assert!( (3... 3).contains(3));
299- /// assert!(!(3... 2).contains(3));
298+ /// assert!( (3..= 3).contains(3));
299+ /// assert!(!(3..= 2).contains(3));
300300 /// ```
301301 pub fn contains ( & self , item : Idx ) -> bool {
302302 self . start <= item && item <= self . end
303303 }
304304}
305305
306- /// A range only bounded inclusively above (`... end`).
306+ /// A range only bounded inclusively above (`..= end`).
307307///
308- /// The `RangeToInclusive` `... end` contains all values with `x <= end`.
308+ /// The `RangeToInclusive` `..= end` contains all values with `x <= end`.
309309/// It cannot serve as an [`Iterator`] because it doesn't have a starting point.
310310///
311311/// # Examples
312312///
313- /// The `... end` syntax is a `RangeToInclusive`:
313+ /// The `..= end` syntax is a `RangeToInclusive`:
314314///
315315/// ```
316316/// #![feature(inclusive_range,inclusive_range_syntax)]
317- /// assert_eq!((... 5), std::ops::RangeToInclusive{ end: 5 });
317+ /// assert_eq!((..= 5), std::ops::RangeToInclusive{ end: 5 });
318318/// ```
319319///
320320/// It does not have an [`IntoIterator`] implementation, so you can't use it in a
@@ -325,7 +325,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
325325///
326326/// // error[E0277]: the trait bound `std::ops::RangeToInclusive<{integer}>:
327327/// // std::iter::Iterator` is not satisfied
328- /// for i in ... 5 {
328+ /// for i in ..= 5 {
329329/// // ...
330330/// }
331331/// ```
@@ -337,8 +337,8 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
337337/// #![feature(inclusive_range_syntax)]
338338///
339339/// let arr = [0, 1, 2, 3];
340- /// assert_eq!(arr[ ... 2], [0,1,2 ]); // RangeToInclusive
341- /// assert_eq!(arr[1... 2], [ 1,2 ]);
340+ /// assert_eq!(arr[ ..= 2], [0,1,2 ]); // RangeToInclusive
341+ /// assert_eq!(arr[1..= 2], [ 1,2 ]);
342342/// ```
343343///
344344/// [`IntoIterator`]: ../iter/trait.Iterator.html
@@ -357,7 +357,7 @@ pub struct RangeToInclusive<Idx> {
357357#[ unstable( feature = "inclusive_range" , reason = "recently added, follows RFC" , issue = "28237" ) ]
358358impl < Idx : fmt:: Debug > fmt:: Debug for RangeToInclusive < Idx > {
359359 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
360- write ! ( fmt, "... {:?}" , self . end)
360+ write ! ( fmt, "..= {:?}" , self . end)
361361 }
362362}
363363
@@ -370,9 +370,9 @@ impl<Idx: PartialOrd<Idx>> RangeToInclusive<Idx> {
370370 /// ```
371371 /// #![feature(range_contains,inclusive_range_syntax)]
372372 ///
373- /// assert!( (... 5).contains(-1_000_000_000));
374- /// assert!( (... 5).contains(5));
375- /// assert!(!(... 5).contains(6));
373+ /// assert!( (..= 5).contains(-1_000_000_000));
374+ /// assert!( (..= 5).contains(5));
375+ /// assert!(!(..= 5).contains(6));
376376 /// ```
377377 pub fn contains ( & self , item : Idx ) -> bool {
378378 ( item <= self . end )
0 commit comments