diff options
| author | Lzu Tao <taolzu@gmail.com> | 2020-06-09 14:36:01 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2020-06-09 14:36:01 +0000 |
| commit | 8db24840f7457f005cb73807197992922ca960b1 (patch) | |
| tree | 2292cc4af0a6e7d31b1aaa3265c4b937a044cea5 /clippy_lints/src/integer_division.rs | |
| parent | 161474b7f7a203215e0b4c468390f13d7b230a80 (diff) | |
Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippy
Diffstat (limited to 'clippy_lints/src/integer_division.rs')
| -rw-r--r-- | clippy_lints/src/integer_division.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/clippy_lints/src/integer_division.rs b/clippy_lints/src/integer_division.rs index fe34d33fe65..d537ef3f323 100644 --- a/clippy_lints/src/integer_division.rs +++ b/clippy_lints/src/integer_division.rs @@ -15,10 +15,13 @@ declare_clippy_lint! { /// /// **Example:** /// ```rust - /// fn main() { - /// let x = 3 / 2; - /// println!("{}", x); - /// } + /// // Bad + /// let x = 3 / 2; + /// println!("{}", x); + /// + /// // Good + /// let x = 3f32 / 2f32; + /// println!("{}", x); /// ``` pub INTEGER_DIVISION, restriction, |
