]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/num/mod.rs
Capitalize safety comments
[rust.git] / library / core / src / num / mod.rs
index 68937176270356a031ac23cf1fed6053f5edff5a..2a936c1867da00e63c50e5a07429dba4b84986bd 100644 (file)
@@ -124,7 +124,7 @@ impl BitOr for $Ty {
                 type Output = Self;
                 #[inline]
                 fn bitor(self, rhs: Self) -> Self::Output {
-                    // Safety: since `self` and `rhs` are both nonzero, the
+                    // SAFETY: since `self` and `rhs` are both nonzero, the
                     // result of the bitwise-or will be nonzero.
                     unsafe { $Ty::new_unchecked(self.get() | rhs.get()) }
                 }
@@ -135,7 +135,7 @@ impl BitOr<$Int> for $Ty {
                 type Output = Self;
                 #[inline]
                 fn bitor(self, rhs: $Int) -> Self::Output {
-                    // Safety: since `self` is nonzero, the result of the
+                    // SAFETY: since `self` is nonzero, the result of the
                     // bitwise-or will be nonzero regardless of the value of
                     // `rhs`.
                     unsafe { $Ty::new_unchecked(self.get() | rhs) }
@@ -147,7 +147,7 @@ impl BitOr<$Ty> for $Int {
                 type Output = $Ty;
                 #[inline]
                 fn bitor(self, rhs: $Ty) -> Self::Output {
-                    // Safety: since `rhs` is nonzero, the result of the
+                    // SAFETY: since `rhs` is nonzero, the result of the
                     // bitwise-or will be nonzero regardless of the value of
                     // `self`.
                     unsafe { $Ty::new_unchecked(self | rhs.get()) }
@@ -1573,7 +1573,7 @@ pub const fn wrapping_shr(self, rhs: u32) -> Self {
 the boundary of the type.
 
 The only case where such wrapping can occur is when one takes the absolute value of the negative
-minimal value for the type this is a positive value that is too large to represent in the type. In
+minimal value for the type; this is a positive value that is too large to represent in the type. In
 such a case, this function returns `MIN` itself.
 
 # Examples
@@ -2470,7 +2470,7 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
         doc_comment! {
             concat!("**This method is soft-deprecated.**
 
-Although using it won’t cause compilation warning,
+Although using it won’t cause compilation warning,
 new code should use [`", stringify!($SelfT), "::MIN", "`](#associatedconstant.MIN) instead.
 
 Returns the smallest value that can be represented by this integer type."),
@@ -2486,7 +2486,7 @@ pub const fn min_value() -> Self {
         doc_comment! {
             concat!("**This method is soft-deprecated.**
 
-Although using it won’t cause compilation warning,
+Although using it won’t cause compilation warning,
 new code should use [`", stringify!($SelfT), "::MAX", "`](#associatedconstant.MAX) instead.
 
 Returns the largest value that can be represented by this integer type."),