7
7
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
+ #![ unstable( feature = "collections_range" , reason = "was just added" ) ]
10
11
11
12
//! Range syntax.
12
13
13
14
use core:: option:: Option :: { self , None , Some } ;
14
15
use core:: ops:: { RangeFull , Range , RangeTo , RangeFrom } ;
15
16
16
- #[ unstable( feature = "collections" , reason = "was just added" ) ]
17
17
/// **RangeArgument** is implemented by Rust's built-in range types, produced
18
18
/// by range syntax like `..`, `a..`, `..b` or `c..d`.
19
19
pub trait RangeArgument < T > {
@@ -29,20 +29,16 @@ pub trait RangeArgument<T> {
29
29
}
30
30
31
31
32
- #[ unstable( feature = "collections" , reason = "was just added" ) ]
33
32
impl < T > RangeArgument < T > for RangeFull { }
34
33
35
- #[ unstable( feature = "collections" , reason = "was just added" ) ]
36
34
impl < T > RangeArgument < T > for RangeFrom < T > {
37
35
fn start ( & self ) -> Option < & T > { Some ( & self . start ) }
38
36
}
39
37
40
- #[ unstable( feature = "collections" , reason = "was just added" ) ]
41
38
impl < T > RangeArgument < T > for RangeTo < T > {
42
39
fn end ( & self ) -> Option < & T > { Some ( & self . end ) }
43
40
}
44
41
45
- #[ unstable( feature = "collections" , reason = "was just added" ) ]
46
42
impl < T > RangeArgument < T > for Range < T > {
47
43
fn start ( & self ) -> Option < & T > { Some ( & self . start ) }
48
44
fn end ( & self ) -> Option < & T > { Some ( & self . end ) }
0 commit comments