mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
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
This commit is contained in:
commit
f2c74e220b
@ -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! {
|
||||
|
Loading…
Reference in New Issue
Block a user