@@ -2826,8 +2826,8 @@ macro_rules! int_impl {
28262826 ///
28272827 /// # Panics
28282828 ///
2829- /// This function will panic if `rhs` is 0 or if `self` is -1 and `rhs` is
2830- /// `Self::MIN` . This behavior is not affected by the `overflow-checks` flag.
2829+ /// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
2830+ /// and `rhs` is -1 . This behavior is not affected by the `overflow-checks` flag.
28312831 ///
28322832 /// # Examples
28332833 ///
@@ -2865,8 +2865,8 @@ macro_rules! int_impl {
28652865 ///
28662866 /// # Panics
28672867 ///
2868- /// This function will panic if `rhs` is 0 or if `self` is -1 and `rhs` is
2869- /// `Self::MIN` . This behavior is not affected by the `overflow-checks` flag.
2868+ /// This function will panic if `rhs` is 0 or if `self` is `Self::MIN` and
2869+ /// `rhs` is -1 . This behavior is not affected by the `overflow-checks` flag.
28702870 ///
28712871 /// # Examples
28722872 ///
@@ -2881,6 +2881,11 @@ macro_rules! int_impl {
28812881 /// assert_eq!(a.rem_euclid(-b), 3);
28822882 /// assert_eq!((-a).rem_euclid(-b), 1);
28832883 /// ```
2884+ ///
2885+ /// This will panic:
2886+ /// ```should_panic
2887+ #[ doc = concat!( "let _ = " , stringify!( $SelfT) , "::MIN.rem_euclid(-1);" ) ]
2888+ /// ```
28842889 #[ doc( alias = "modulo" , alias = "mod" ) ]
28852890 #[ stable( feature = "euclidean_division" , since = "1.38.0" ) ]
28862891 #[ rustc_const_stable( feature = "const_euclidean_int_methods" , since = "1.52.0" ) ]
@@ -2909,8 +2914,8 @@ macro_rules! int_impl {
29092914 ///
29102915 /// # Panics
29112916 ///
2912- /// This function will panic if `rhs` is 0 or if `self` is -1 and `rhs` is
2913- /// `Self::MIN` . This behavior is not affected by the `overflow-checks` flag.
2917+ /// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
2918+ /// and `rhs` is -1 . This behavior is not affected by the `overflow-checks` flag.
29142919 ///
29152920 /// # Examples
29162921 ///
@@ -2945,8 +2950,8 @@ macro_rules! int_impl {
29452950 ///
29462951 /// # Panics
29472952 ///
2948- /// This function will panic if `rhs` is 0 or if `self` is -1 and `rhs` is
2949- /// `Self::MIN` . This behavior is not affected by the `overflow-checks` flag.
2953+ /// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
2954+ /// and `rhs` is -1 . This behavior is not affected by the `overflow-checks` flag.
29502955 ///
29512956 /// # Examples
29522957 ///
0 commit comments