@@ -2888,8 +2888,8 @@ macro_rules! int_impl {
2888
2888
///
2889
2889
/// # Panics
2890
2890
///
2891
- /// This function will panic if `rhs` is 0 or if `self` is -1 and `rhs` is
2892
- /// `Self::MIN` . This behavior is not affected by the `overflow-checks` flag.
2891
+ /// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
2892
+ /// and `rhs` is -1 . This behavior is not affected by the `overflow-checks` flag.
2893
2893
///
2894
2894
/// # Examples
2895
2895
///
@@ -2927,8 +2927,8 @@ macro_rules! int_impl {
2927
2927
///
2928
2928
/// # Panics
2929
2929
///
2930
- /// This function will panic if `rhs` is 0 or if `self` is -1 and `rhs` is
2931
- /// `Self::MIN` . This behavior is not affected by the `overflow-checks` flag.
2930
+ /// This function will panic if `rhs` is 0 or if `self` is `Self::MIN` and
2931
+ /// `rhs` is -1 . This behavior is not affected by the `overflow-checks` flag.
2932
2932
///
2933
2933
/// # Examples
2934
2934
///
@@ -2943,6 +2943,11 @@ macro_rules! int_impl {
2943
2943
/// assert_eq!(a.rem_euclid(-b), 3);
2944
2944
/// assert_eq!((-a).rem_euclid(-b), 1);
2945
2945
/// ```
2946
+ ///
2947
+ /// This will panic:
2948
+ /// ```should_panic
2949
+ #[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MIN.rem_euclid(-1);" ) ]
2950
+ /// ```
2946
2951
#[ doc( alias = "modulo" , alias = "mod" ) ]
2947
2952
#[ stable( feature = "euclidean_division" , since = "1.38.0" ) ]
2948
2953
#[ rustc_const_stable( feature = "const_euclidean_int_methods" , since = "1.52.0" ) ]
@@ -2971,8 +2976,8 @@ macro_rules! int_impl {
2971
2976
///
2972
2977
/// # Panics
2973
2978
///
2974
- /// This function will panic if `rhs` is 0 or if `self` is -1 and `rhs` is
2975
- /// `Self::MIN` . This behavior is not affected by the `overflow-checks` flag.
2979
+ /// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
2980
+ /// and `rhs` is -1 . This behavior is not affected by the `overflow-checks` flag.
2976
2981
///
2977
2982
/// # Examples
2978
2983
///
@@ -3007,8 +3012,8 @@ macro_rules! int_impl {
3007
3012
///
3008
3013
/// # Panics
3009
3014
///
3010
- /// This function will panic if `rhs` is 0 or if `self` is -1 and `rhs` is
3011
- /// `Self::MIN` . This behavior is not affected by the `overflow-checks` flag.
3015
+ /// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
3016
+ /// and `rhs` is -1 . This behavior is not affected by the `overflow-checks` flag.
3012
3017
///
3013
3018
/// # Examples
3014
3019
///
0 commit comments