Skip to content

Commit a5d34e1

Browse files
committedJul 1, 2017
Auto merge of #42991 - sfackler:unstable-rangeargument, r=alexcrichton
Revert "Stabilize RangeArgument" This reverts commit 143206d. From the discussion in #30877 it seems like this is premature.
2 parents 7a2c09b + 0a9c136 commit a5d34e1

File tree

15 files changed

+217
-187
lines changed

15 files changed

+217
-187
lines changed
 

‎src/liballoc/btree/map.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ use core::fmt::Debug;
1313
use core::hash::{Hash, Hasher};
1414
use core::iter::{FromIterator, Peekable, FusedIterator};
1515
use core::marker::PhantomData;
16-
use core::ops::{Index, RangeArgument};
17-
use core::ops::Bound::{Excluded, Included, Unbounded};
16+
use core::ops::Index;
1817
use core::{fmt, intrinsics, mem, ptr};
1918

2019
use borrow::Borrow;
20+
use Bound::{Excluded, Included, Unbounded};
21+
use range::RangeArgument;
2122

2223
use super::node::{self, Handle, NodeRef, marker};
2324
use super::search;

‎src/liballoc/btree/set.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ use core::cmp::{min, max};
1616
use core::fmt::Debug;
1717
use core::fmt;
1818
use core::iter::{Peekable, FromIterator, FusedIterator};
19-
use core::ops::{BitOr, BitAnd, BitXor, Sub, RangeArgument};
19+
use core::ops::{BitOr, BitAnd, BitXor, Sub};
2020

2121
use borrow::Borrow;
2222
use btree_map::{BTreeMap, Keys};
2323
use super::Recover;
24+
use range::RangeArgument;
2425

2526
// FIXME(conventions): implement bounded iterators
2627

‎src/liballoc/lib.rs

+50-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,56 @@ mod std {
203203
pub use core::ops; // RangeFull
204204
}
205205

206-
pub use core::ops::Bound;
206+
/// An endpoint of a range of keys.
207+
///
208+
/// # Examples
209+
///
210+
/// `Bound`s are range endpoints:
211+
///
212+
/// ```
213+
/// #![feature(collections_range)]
214+
///
215+
/// use std::collections::range::RangeArgument;
216+
/// use std::collections::Bound::*;
217+
///
218+
/// assert_eq!((..100).start(), Unbounded);
219+
/// assert_eq!((1..12).start(), Included(&1));
220+
/// assert_eq!((1..12).end(), Excluded(&12));
221+
/// ```
222+
///
223+
/// Using a tuple of `Bound`s as an argument to [`BTreeMap::range`].
224+
/// Note that in most cases, it's better to use range syntax (`1..5`) instead.
225+
///
226+
/// ```
227+
/// use std::collections::BTreeMap;
228+
/// use std::collections::Bound::{Excluded, Included, Unbounded};
229+
///
230+
/// let mut map = BTreeMap::new();
231+
/// map.insert(3, "a");
232+
/// map.insert(5, "b");
233+
/// map.insert(8, "c");
234+
///
235+
/// for (key, value) in map.range((Excluded(3), Included(8))) {
236+
/// println!("{}: {}", key, value);
237+
/// }
238+
///
239+
/// assert_eq!(Some((&3, &"a")), map.range((Unbounded, Included(5))).next());
240+
/// ```
241+
///
242+
/// [`BTreeMap::range`]: btree_map/struct.BTreeMap.html#method.range
243+
#[stable(feature = "collections_bound", since = "1.17.0")]
244+
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
245+
pub enum Bound<T> {
246+
/// An inclusive bound.
247+
#[stable(feature = "collections_bound", since = "1.17.0")]
248+
Included(T),
249+
/// An exclusive bound.
250+
#[stable(feature = "collections_bound", since = "1.17.0")]
251+
Excluded(T),
252+
/// An infinite endpoint. Indicates that there is no bound in this direction.
253+
#[stable(feature = "collections_bound", since = "1.17.0")]
254+
Unbounded,
255+
}
207256

208257
/// An intermediate trait for specialization of `Extend`.
209258
#[doc(hidden)]

‎src/liballoc/range.rs

+136-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,142 @@
1111
#![unstable(feature = "collections_range",
1212
reason = "waiting for dust to settle on inclusive ranges",
1313
issue = "30877")]
14-
#![rustc_deprecated(reason = "moved to core::ops", since = "1.19.0")]
1514

1615
//! Range syntax.
1716
18-
pub use core::ops::RangeArgument;
17+
use core::ops::{RangeFull, Range, RangeTo, RangeFrom, RangeInclusive, RangeToInclusive};
18+
use Bound::{self, Excluded, Included, Unbounded};
19+
20+
/// `RangeArgument` is implemented by Rust's built-in range types, produced
21+
/// by range syntax like `..`, `a..`, `..b` or `c..d`.
22+
pub trait RangeArgument<T: ?Sized> {
23+
/// Start index bound.
24+
///
25+
/// Returns the start value as a `Bound`.
26+
///
27+
/// # Examples
28+
///
29+
/// ```
30+
/// #![feature(alloc)]
31+
/// #![feature(collections_range)]
32+
///
33+
/// extern crate alloc;
34+
///
35+
/// # fn main() {
36+
/// use alloc::range::RangeArgument;
37+
/// use alloc::Bound::*;
38+
///
39+
/// assert_eq!((..10).start(), Unbounded);
40+
/// assert_eq!((3..10).start(), Included(&3));
41+
/// # }
42+
/// ```
43+
fn start(&self) -> Bound<&T>;
44+
45+
/// End index bound.
46+
///
47+
/// Returns the end value as a `Bound`.
48+
///
49+
/// # Examples
50+
///
51+
/// ```
52+
/// #![feature(alloc)]
53+
/// #![feature(collections_range)]
54+
///
55+
/// extern crate alloc;
56+
///
57+
/// # fn main() {
58+
/// use alloc::range::RangeArgument;
59+
/// use alloc::Bound::*;
60+
///
61+
/// assert_eq!((3..).end(), Unbounded);
62+
/// assert_eq!((3..10).end(), Excluded(&10));
63+
/// # }
64+
/// ```
65+
fn end(&self) -> Bound<&T>;
66+
}
67+
68+
// FIXME add inclusive ranges to RangeArgument
69+
70+
impl<T: ?Sized> RangeArgument<T> for RangeFull {
71+
fn start(&self) -> Bound<&T> {
72+
Unbounded
73+
}
74+
fn end(&self) -> Bound<&T> {
75+
Unbounded
76+
}
77+
}
78+
79+
impl<T> RangeArgument<T> for RangeFrom<T> {
80+
fn start(&self) -> Bound<&T> {
81+
Included(&self.start)
82+
}
83+
fn end(&self) -> Bound<&T> {
84+
Unbounded
85+
}
86+
}
87+
88+
impl<T> RangeArgument<T> for RangeTo<T> {
89+
fn start(&self) -> Bound<&T> {
90+
Unbounded
91+
}
92+
fn end(&self) -> Bound<&T> {
93+
Excluded(&self.end)
94+
}
95+
}
96+
97+
impl<T> RangeArgument<T> for Range<T> {
98+
fn start(&self) -> Bound<&T> {
99+
Included(&self.start)
100+
}
101+
fn end(&self) -> Bound<&T> {
102+
Excluded(&self.end)
103+
}
104+
}
105+
106+
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
107+
impl<T> RangeArgument<T> for RangeInclusive<T> {
108+
fn start(&self) -> Bound<&T> {
109+
Included(&self.start)
110+
}
111+
fn end(&self) -> Bound<&T> {
112+
Included(&self.end)
113+
}
114+
}
115+
116+
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
117+
impl<T> RangeArgument<T> for RangeToInclusive<T> {
118+
fn start(&self) -> Bound<&T> {
119+
Unbounded
120+
}
121+
fn end(&self) -> Bound<&T> {
122+
Included(&self.end)
123+
}
124+
}
125+
126+
impl<T> RangeArgument<T> for (Bound<T>, Bound<T>) {
127+
fn start(&self) -> Bound<&T> {
128+
match *self {
129+
(Included(ref start), _) => Included(start),
130+
(Excluded(ref start), _) => Excluded(start),
131+
(Unbounded, _) => Unbounded,
132+
}
133+
}
134+
135+
fn end(&self) -> Bound<&T> {
136+
match *self {
137+
(_, Included(ref end)) => Included(end),
138+
(_, Excluded(ref end)) => Excluded(end),
139+
(_, Unbounded) => Unbounded,
140+
}
141+
}
142+
}
143+
144+
impl<'a, T: ?Sized + 'a> RangeArgument<T> for (Bound<&'a T>, Bound<&'a T>) {
145+
fn start(&self) -> Bound<&T> {
146+
self.0
147+
}
148+
149+
fn end(&self) -> Bound<&T> {
150+
self.1
151+
}
152+
}

‎src/liballoc/string.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,15 @@
5959
use core::fmt;
6060
use core::hash;
6161
use core::iter::{FromIterator, FusedIterator};
62-
use core::ops::{self, Add, AddAssign, Index, IndexMut, RangeArgument};
63-
use core::ops::Bound::{Excluded, Included, Unbounded};
62+
use core::ops::{self, Add, AddAssign, Index, IndexMut};
6463
use core::ptr;
6564
use core::str::pattern::Pattern;
6665
use std_unicode::lossy;
6766
use std_unicode::char::{decode_utf16, REPLACEMENT_CHARACTER};
6867

6968
use borrow::{Cow, ToOwned};
69+
use range::RangeArgument;
70+
use Bound::{Excluded, Included, Unbounded};
7071
use str::{self, from_boxed_utf8_unchecked, FromStr, Utf8Error, Chars};
7172
use vec::Vec;
7273
use boxed::Box;

‎src/liballoc/vec.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ use core::iter::{FromIterator, FusedIterator, TrustedLen};
7474
use core::mem;
7575
#[cfg(not(test))]
7676
use core::num::Float;
77-
use core::ops::{InPlace, Index, IndexMut, Place, Placer, RangeArgument};
78-
use core::ops::Bound::{Excluded, Included, Unbounded};
77+
use core::ops::{InPlace, Index, IndexMut, Place, Placer};
7978
use core::ops;
8079
use core::ptr;
8180
use core::ptr::Shared;
@@ -85,6 +84,8 @@ use borrow::ToOwned;
8584
use borrow::Cow;
8685
use boxed::Box;
8786
use raw_vec::RawVec;
87+
use super::range::RangeArgument;
88+
use Bound::{Excluded, Included, Unbounded};
8889

8990
/// A contiguous growable array type, written `Vec<T>` but pronounced 'vector'.
9091
///

‎src/liballoc/vec_deque.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ use core::cmp::Ordering;
2121
use core::fmt;
2222
use core::iter::{repeat, FromIterator, FusedIterator};
2323
use core::mem;
24-
use core::ops::{Index, IndexMut, Place, Placer, InPlace, RangeArgument};
25-
use core::ops::Bound::{Excluded, Included, Unbounded};
24+
use core::ops::{Index, IndexMut, Place, Placer, InPlace};
2625
use core::ptr;
2726
use core::ptr::Shared;
2827
use core::slice;
@@ -32,6 +31,8 @@ use core::cmp;
3231

3332
use raw_vec::RawVec;
3433

34+
use super::range::RangeArgument;
35+
use Bound::{Excluded, Included, Unbounded};
3536
use super::vec::Vec;
3637

3738
const INITIAL_CAPACITY: usize = 7; // 2^3 - 1

‎src/libcollections/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ pub use alloc::binary_heap;
4646
pub use alloc::borrow;
4747
pub use alloc::fmt;
4848
pub use alloc::linked_list;
49-
#[allow(deprecated)]
5049
pub use alloc::range;
5150
pub use alloc::slice;
5251
pub use alloc::str;

‎src/libcore/ops/mod.rs

-3
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ pub use self::index::{Index, IndexMut};
183183
#[stable(feature = "rust1", since = "1.0.0")]
184184
pub use self::range::{Range, RangeFrom, RangeFull, RangeTo};
185185

186-
#[stable(feature = "range_argument", since = "1.19.0")]
187-
pub use self::range::{RangeArgument, Bound};
188-
189186
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
190187
pub use self::range::{RangeInclusive, RangeToInclusive};
191188

‎src/libcore/ops/range.rs

+9-165
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
use fmt;
12-
use ops::Bound::{Included, Excluded, Unbounded};
1312

1413
/// An unbounded range. Use `..` (two dots) for its shorthand.
1514
///
@@ -72,8 +71,7 @@ impl fmt::Debug for RangeFull {
7271
/// assert_eq!(arr[1..3], [ 1,2 ]); // Range
7372
/// }
7473
/// ```
75-
#[derive(Clone, PartialEq, Eq, Hash)]
76-
// not Copy -- see #27186
74+
#[derive(Clone, PartialEq, Eq, Hash)] // not Copy -- see #27186
7775
#[stable(feature = "rust1", since = "1.0.0")]
7876
pub struct Range<Idx> {
7977
/// The lower bound of the range (inclusive).
@@ -136,8 +134,7 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
136134
/// assert_eq!(arr[1..3], [ 1,2 ]);
137135
/// }
138136
/// ```
139-
#[derive(Clone, PartialEq, Eq, Hash)]
140-
// not Copy -- see #27186
137+
#[derive(Clone, PartialEq, Eq, Hash)] // not Copy -- see #27186
141138
#[stable(feature = "rust1", since = "1.0.0")]
142139
pub struct RangeFrom<Idx> {
143140
/// The lower bound of the range (inclusive).
@@ -253,16 +250,17 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
253250
/// assert_eq!(arr[1...2], [ 1,2 ]); // RangeInclusive
254251
/// }
255252
/// ```
256-
#[derive(Clone, PartialEq, Eq, Hash)]
257-
// not Copy -- see #27186
253+
#[derive(Clone, PartialEq, Eq, Hash)] // not Copy -- see #27186
258254
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
259255
pub struct RangeInclusive<Idx> {
260256
/// The lower bound of the range (inclusive).
261-
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC",
257+
#[unstable(feature = "inclusive_range",
258+
reason = "recently added, follows RFC",
262259
issue = "28237")]
263260
pub start: Idx,
264261
/// The upper bound of the range (inclusive).
265-
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC",
262+
#[unstable(feature = "inclusive_range",
263+
reason = "recently added, follows RFC",
266264
issue = "28237")]
267265
pub end: Idx,
268266
}
@@ -335,7 +333,8 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
335333
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
336334
pub struct RangeToInclusive<Idx> {
337335
/// The upper bound of the range (inclusive)
338-
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC",
336+
#[unstable(feature = "inclusive_range",
337+
reason = "recently added, follows RFC",
339338
issue = "28237")]
340339
pub end: Idx,
341340
}
@@ -366,158 +365,3 @@ impl<Idx: PartialOrd<Idx>> RangeToInclusive<Idx> {
366365

367366
// RangeToInclusive<Idx> cannot impl From<RangeTo<Idx>>
368367
// because underflow would be possible with (..0).into()
369-
370-
/// `RangeArgument` is implemented by Rust's built-in range types, produced
371-
/// by range syntax like `..`, `a..`, `..b` or `c..d`.
372-
#[stable(feature = "range_argument", since = "1.19.0")]
373-
pub trait RangeArgument<T: ?Sized> {
374-
/// Start index bound.
375-
///
376-
/// Returns the start value as a `Bound`.
377-
///
378-
/// # Examples
379-
///
380-
/// ```
381-
/// use std::ops::RangeArgument;
382-
/// use std::ops::Bound::*;
383-
///
384-
/// assert_eq!((..10).start(), Unbounded);
385-
/// assert_eq!((3..10).start(), Included(&3));
386-
/// ```
387-
#[stable(feature = "range_argument", since = "1.19.0")]
388-
fn start(&self) -> Bound<&T>;
389-
390-
/// End index bound.
391-
///
392-
/// Returns the end value as a `Bound`.
393-
///
394-
/// # Examples
395-
///
396-
/// ```
397-
/// use std::ops::RangeArgument;
398-
/// use std::ops::Bound::*;
399-
///
400-
/// assert_eq!((3..).end(), Unbounded);
401-
/// assert_eq!((3..10).end(), Excluded(&10));
402-
/// ```
403-
#[stable(feature = "range_argument", since = "1.19.0")]
404-
fn end(&self) -> Bound<&T>;
405-
}
406-
407-
#[stable(feature = "range_argument", since = "1.19.0")]
408-
impl<T: ?Sized> RangeArgument<T> for RangeFull {
409-
fn start(&self) -> Bound<&T> {
410-
Unbounded
411-
}
412-
fn end(&self) -> Bound<&T> {
413-
Unbounded
414-
}
415-
}
416-
417-
#[stable(feature = "range_argument", since = "1.19.0")]
418-
impl<T> RangeArgument<T> for RangeFrom<T> {
419-
fn start(&self) -> Bound<&T> {
420-
Included(&self.start)
421-
}
422-
fn end(&self) -> Bound<&T> {
423-
Unbounded
424-
}
425-
}
426-
427-
#[stable(feature = "range_argument", since = "1.19.0")]
428-
impl<T> RangeArgument<T> for RangeTo<T> {
429-
fn start(&self) -> Bound<&T> {
430-
Unbounded
431-
}
432-
fn end(&self) -> Bound<&T> {
433-
Excluded(&self.end)
434-
}
435-
}
436-
437-
#[stable(feature = "range_argument", since = "1.19.0")]
438-
impl<T> RangeArgument<T> for Range<T> {
439-
fn start(&self) -> Bound<&T> {
440-
Included(&self.start)
441-
}
442-
fn end(&self) -> Bound<&T> {
443-
Excluded(&self.end)
444-
}
445-
}
446-
447-
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
448-
impl<T> RangeArgument<T> for RangeInclusive<T> {
449-
fn start(&self) -> Bound<&T> {
450-
Included(&self.start)
451-
}
452-
fn end(&self) -> Bound<&T> {
453-
Included(&self.end)
454-
}
455-
}
456-
457-
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
458-
impl<T> RangeArgument<T> for RangeToInclusive<T> {
459-
fn start(&self) -> Bound<&T> {
460-
Unbounded
461-
}
462-
fn end(&self) -> Bound<&T> {
463-
Included(&self.end)
464-
}
465-
}
466-
467-
#[stable(feature = "range_argument", since = "1.19.0")]
468-
impl<T> RangeArgument<T> for (Bound<T>, Bound<T>) {
469-
fn start(&self) -> Bound<&T> {
470-
match *self {
471-
(Included(ref start), _) => Included(start),
472-
(Excluded(ref start), _) => Excluded(start),
473-
(Unbounded, _) => Unbounded,
474-
}
475-
}
476-
477-
fn end(&self) -> Bound<&T> {
478-
match *self {
479-
(_, Included(ref end)) => Included(end),
480-
(_, Excluded(ref end)) => Excluded(end),
481-
(_, Unbounded) => Unbounded,
482-
}
483-
}
484-
}
485-
486-
#[stable(feature = "range_argument", since = "1.19.0")]
487-
impl<'a, T: ?Sized + 'a> RangeArgument<T> for (Bound<&'a T>, Bound<&'a T>) {
488-
fn start(&self) -> Bound<&T> {
489-
self.0
490-
}
491-
492-
fn end(&self) -> Bound<&T> {
493-
self.1
494-
}
495-
}
496-
497-
/// An endpoint of a range of keys.
498-
///
499-
/// # Examples
500-
///
501-
/// `Bound`s are range endpoints:
502-
///
503-
/// ```
504-
/// use std::ops::RangeArgument;
505-
/// use std::ops::Bound::*;
506-
///
507-
/// assert_eq!((..100).start(), Unbounded);
508-
/// assert_eq!((1..12).start(), Included(&1));
509-
/// assert_eq!((1..12).end(), Excluded(&12));
510-
/// ```
511-
#[stable(feature = "collections_bound", since = "1.17.0")]
512-
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
513-
pub enum Bound<T> {
514-
/// An inclusive bound.
515-
#[stable(feature = "collections_bound", since = "1.17.0")]
516-
Included(T),
517-
/// An exclusive bound.
518-
#[stable(feature = "collections_bound", since = "1.17.0")]
519-
Excluded(T),
520-
/// An infinite endpoint. Indicates that there is no bound in this direction.
521-
#[stable(feature = "collections_bound", since = "1.17.0")]
522-
Unbounded,
523-
}

‎src/librustc_data_structures/accumulate_vec.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
//!
1616
//! The N above is determined by Array's implementor, by way of an associatated constant.
1717
18-
use std::ops::{Deref, DerefMut, RangeArgument};
18+
use std::ops::{Deref, DerefMut};
1919
use std::iter::{self, IntoIterator, FromIterator};
2020
use std::slice;
2121
use std::vec;
22+
use std::collections::range::RangeArgument;
2223

2324
use rustc_serialize::{Encodable, Encoder, Decodable, Decoder};
2425

‎src/librustc_data_structures/array_vec.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
use std::marker::Unsize;
1414
use std::iter::Extend;
1515
use std::ptr::{self, drop_in_place, Shared};
16-
use std::ops::{Deref, DerefMut, Range, RangeArgument};
17-
use std::ops::Bound::{Excluded, Included, Unbounded};
16+
use std::ops::{Deref, DerefMut, Range};
1817
use std::hash::{Hash, Hasher};
1918
use std::slice;
2019
use std::fmt;
2120
use std::mem;
21+
use std::collections::range::RangeArgument;
22+
use std::collections::Bound::{Excluded, Included, Unbounded};
2223
use std::mem::ManuallyDrop;
2324

2425
pub unsafe trait Array {

‎src/librustc_data_structures/indexed_vec.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use std::collections::range::RangeArgument;
1112
use std::fmt::Debug;
1213
use std::iter::{self, FromIterator};
1314
use std::slice;
1415
use std::marker::PhantomData;
15-
use std::ops::{Index, IndexMut, Range, RangeArgument};
16+
use std::ops::{Index, IndexMut, Range};
1617
use std::fmt;
1718
use std::vec;
1819
use std::u32;

‎src/librustc_data_structures/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#![deny(warnings)]
2626

2727
#![feature(shared)]
28+
#![feature(collections_range)]
2829
#![feature(nonzero)]
2930
#![feature(unboxed_closures)]
3031
#![feature(fn_traits)]

‎src/libstd/collections/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,6 @@ pub use self::hash_map::HashMap;
436436
pub use self::hash_set::HashSet;
437437

438438
#[stable(feature = "rust1", since = "1.0.0")]
439-
#[rustc_deprecated(reason = "moved to std::ops", since = "1.19.0")]
440-
#[allow(deprecated)]
441439
pub use alloc::range;
442440

443441
mod hash;

0 commit comments

Comments
 (0)
Please sign in to comment.