@@ -793,6 +793,13 @@ macro_rules! uint_impl {
793
793
/// #![feature(strict_overflow_ops)]
794
794
#[ doc = concat!( "assert_eq!(100" , stringify!( $SelfT) , ".strict_div(10), 10);" ) ]
795
795
/// ```
796
+ ///
797
+ /// The following panics because of division by zero:
798
+ ///
799
+ /// ```should_panic
800
+ /// #![feature(strict_overflow_ops)]
801
+ #[ doc = concat!( "let _ = (1" , stringify!( $SelfT) , ").strict_div(0);" ) ]
802
+ /// ```
796
803
#[ unstable( feature = "strict_overflow_ops" , issue = "118260" ) ]
797
804
#[ rustc_const_unstable( feature = "const_strict_overflow_ops" , issue = "118260" ) ]
798
805
#[ must_use = "this returns the result of the operation, \
@@ -848,6 +855,12 @@ macro_rules! uint_impl {
848
855
/// #![feature(strict_overflow_ops)]
849
856
#[ doc = concat!( "assert_eq!(100" , stringify!( $SelfT) , ".strict_div_euclid(10), 10);" ) ]
850
857
/// ```
858
+ /// The following panics because of division by zero:
859
+ ///
860
+ /// ```should_panic
861
+ /// #![feature(strict_overflow_ops)]
862
+ #[ doc = concat!( "let _ = (1" , stringify!( $SelfT) , ").strict_div_euclid(0);" ) ]
863
+ /// ```
851
864
#[ unstable( feature = "strict_overflow_ops" , issue = "118260" ) ]
852
865
#[ rustc_const_unstable( feature = "const_strict_overflow_ops" , issue = "118260" ) ]
853
866
#[ must_use = "this returns the result of the operation, \
@@ -903,6 +916,13 @@ macro_rules! uint_impl {
903
916
/// #![feature(strict_overflow_ops)]
904
917
#[ doc = concat!( "assert_eq!(100" , stringify!( $SelfT) , ".strict_rem(10), 0);" ) ]
905
918
/// ```
919
+ ///
920
+ /// The following panics because of division by zero:
921
+ ///
922
+ /// ```should_panic
923
+ /// #![feature(strict_overflow_ops)]
924
+ #[ doc = concat!( "let _ = 5" , stringify!( $SelfT) , ".strict_rem(0);" ) ]
925
+ /// ```
906
926
#[ unstable( feature = "strict_overflow_ops" , issue = "118260" ) ]
907
927
#[ rustc_const_unstable( feature = "const_strict_overflow_ops" , issue = "118260" ) ]
908
928
#[ must_use = "this returns the result of the operation, \
@@ -959,6 +979,13 @@ macro_rules! uint_impl {
959
979
/// #![feature(strict_overflow_ops)]
960
980
#[ doc = concat!( "assert_eq!(100" , stringify!( $SelfT) , ".strict_rem_euclid(10), 0);" ) ]
961
981
/// ```
982
+ ///
983
+ /// The following panics because of division by zero:
984
+ ///
985
+ /// ```should_panic
986
+ /// #![feature(strict_overflow_ops)]
987
+ #[ doc = concat!( "let _ = 5" , stringify!( $SelfT) , ".strict_rem_euclid(0);" ) ]
988
+ /// ```
962
989
#[ unstable( feature = "strict_overflow_ops" , issue = "118260" ) ]
963
990
#[ rustc_const_unstable( feature = "const_strict_overflow_ops" , issue = "118260" ) ]
964
991
#[ must_use = "this returns the result of the operation, \
0 commit comments