11use crate :: ops:: Try ;
22
33/// Used to make try_fold closures more like normal loops
4- #[ unstable( feature= "control_flow_enum" , reason= "new API" , issue= "75744" ) ]
4+ #[ unstable( feature = "control_flow_enum" , reason = "new API" , issue = "75744" ) ]
55#[ derive( Debug , Clone , Copy , PartialEq ) ]
66pub enum ControlFlow < C , B > {
77 /// Continue in the loop, using the given value for the next iteration
@@ -10,7 +10,7 @@ pub enum ControlFlow<C, B> {
1010 Break ( B ) ,
1111}
1212
13- #[ unstable( feature= "control_flow_enum" , reason= "new API" , issue= "75744" ) ]
13+ #[ unstable( feature = "control_flow_enum" , reason = "new API" , issue = "75744" ) ]
1414impl < C , B > Try for ControlFlow < C , B > {
1515 type Ok = C ;
1616 type Error = B ;
@@ -35,7 +35,7 @@ impl<C, B> ControlFlow<C, B> {
3535 /// Converts the `ControlFlow` into an `Option` which is `Some` if the
3636 /// `ControlFlow` was `Break` and `None` otherwise.
3737 #[ inline]
38- #[ unstable( feature= "control_flow_enum" , reason= "new API" , issue= "75744" ) ]
38+ #[ unstable( feature = "control_flow_enum" , reason = "new API" , issue = "75744" ) ]
3939 pub fn break_value ( self ) -> Option < B > {
4040 match self {
4141 ControlFlow :: Continue ( ..) => None ,
@@ -46,7 +46,7 @@ impl<C, B> ControlFlow<C, B> {
4646
4747impl < R : Try > ControlFlow < R :: Ok , R > {
4848 /// Create a `ControlFlow` from any type implementing `Try`.
49- #[ unstable( feature= "control_flow_enum" , reason= "new API" , issue= "75744" ) ]
49+ #[ unstable( feature = "control_flow_enum" , reason = "new API" , issue = "75744" ) ]
5050 #[ inline]
5151 pub fn from_try ( r : R ) -> Self {
5252 match Try :: into_result ( r) {
@@ -56,7 +56,7 @@ impl<R: Try> ControlFlow<R::Ok, R> {
5656 }
5757
5858 /// Convert a `ControlFlow` into any type implementing `Try`;
59- #[ unstable( feature= "control_flow_enum" , reason= "new API" , issue= "75744" ) ]
59+ #[ unstable( feature = "control_flow_enum" , reason = "new API" , issue = "75744" ) ]
6060 #[ inline]
6161 pub fn into_try ( self ) -> R {
6262 match self {
0 commit comments