1313use core:: option:: Option :: { self , None , Some } ;
1414use core:: ops:: { RangeFull , Range , RangeTo , RangeFrom } ;
1515
16- #[ unstable( feature = "collections" , reason = "was just added" ) ]
1716/// **RangeArgument** is implemented by Rust's built-in range types, produced
1817/// by range syntax like `..`, `a..`, `..b` or `c..d`.
1918pub trait RangeArgument < T > {
@@ -29,20 +28,16 @@ pub trait RangeArgument<T> {
2928}
3029
3130
32- #[ unstable( feature = "collections" , reason = "was just added" ) ]
3331impl < T > RangeArgument < T > for RangeFull { }
3432
35- #[ unstable( feature = "collections" , reason = "was just added" ) ]
3633impl < T > RangeArgument < T > for RangeFrom < T > {
3734 fn start ( & self ) -> Option < & T > { Some ( & self . start ) }
3835}
3936
40- #[ unstable( feature = "collections" , reason = "was just added" ) ]
4137impl < T > RangeArgument < T > for RangeTo < T > {
4238 fn end ( & self ) -> Option < & T > { Some ( & self . end ) }
4339}
4440
45- #[ unstable( feature = "collections" , reason = "was just added" ) ]
4641impl < T > RangeArgument < T > for Range < T > {
4742 fn start ( & self ) -> Option < & T > { Some ( & self . start ) }
4843 fn end ( & self ) -> Option < & T > { Some ( & self . end ) }
0 commit comments