@@ -938,7 +938,9 @@ Basic usage:
938938```
939939" , $Feature, "assert_eq!(100" , stringify!( $SelfT) , ".saturating_add(1), 101);
940940assert_eq!(" , stringify!( $SelfT) , "::max_value().saturating_add(100), " , stringify!( $SelfT) ,
941- "::max_value());" ,
941+ "::max_value());
942+ assert_eq!(" , stringify!( $SelfT) , "::min_value().saturating_add(-1), " , stringify!( $SelfT) ,
943+ "::min_value());" ,
942944$EndFeature, "
943945```" ) ,
944946
@@ -952,7 +954,6 @@ $EndFeature, "
952954 }
953955 }
954956
955-
956957 doc_comment! {
957958 concat!( "Saturating integer subtraction. Computes `self - rhs`, saturating at the
958959numeric bounds instead of overflowing.
@@ -964,7 +965,9 @@ Basic usage:
964965```
965966" , $Feature, "assert_eq!(100" , stringify!( $SelfT) , ".saturating_sub(127), -27);
966967assert_eq!(" , stringify!( $SelfT) , "::min_value().saturating_sub(100), " , stringify!( $SelfT) ,
967- "::min_value());" ,
968+ "::min_value());
969+ assert_eq!(" , stringify!( $SelfT) , "::max_value().saturating_sub(-1), " , stringify!( $SelfT) ,
970+ "::max_value());" ,
968971$EndFeature, "
969972```" ) ,
970973 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
0 commit comments