about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-07 10:21:47 +0000
committerbors <bors@rust-lang.org>2024-07-07 10:21:47 +0000
commitf2c74e220bef89dc62dfbd1d2a4eb49c6ae8b47a (patch)
treeecf7ca810d19e1bc97f5104ae902d9bb0c0a971a
parent0c9016aa1e6bd631aff4c03b86ccb17844ce71a1 (diff)
parentcfccdbb1641289e92d414b01f67c6a22b485a327 (diff)
downloadrust-f2c74e220bef89dc62dfbd1d2a4eb49c6ae8b47a.tar.gz
rust-f2c74e220bef89dc62dfbd1d2a4eb49c6ae8b47a.zip
Auto merge of #12966 - Rudxain:patch-1, r=dswij
Clarify that `modulo_one` only applies to ints

changelog: [`modulo_one`]: (docs) Clarify that it only applies to integers

This might be nitpicky, but it's more technically correct.

It also helps if a user skims through the docs, because they may believe it also applies to `{float}`s. This doc edit minimizes that possibility
-rw-r--r--clippy_lints/src/operators/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/operators/mod.rs b/clippy_lints/src/operators/mod.rs
index 202ee61506c..1079934934c 100644
--- a/clippy_lints/src/operators/mod.rs
+++ b/clippy_lints/src/operators/mod.rs
@@ -641,7 +641,7 @@ declare_clippy_lint! {
 
 declare_clippy_lint! {
     /// ### What it does
-    /// Checks for getting the remainder of a division by one or minus
+    /// Checks for getting the remainder of integer division by one or minus
     /// one.
     ///
     /// ### Why is this bad?
@@ -660,7 +660,7 @@ declare_clippy_lint! {
     #[clippy::version = "pre 1.29.0"]
     pub MODULO_ONE,
     correctness,
-    "taking a number modulo +/-1, which can either panic/overflow or always returns 0"
+    "taking an integer modulo +/-1, which can either panic/overflow or always returns 0"
 }
 
 declare_clippy_lint! {