diff options
| author | Catherine Flores <catherine.3.flores@gmail.com> | 2024-12-08 07:12:15 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-08 07:12:15 +0000 |
| commit | d1e1aff8c876b97406f89d536e1bf9aa95ff8c83 (patch) | |
| tree | 3842de33e348094e51547b83c9466e5fdaefa5ea | |
| parent | 7f866c7cc66693ffd9bf082726e6354ec3d09369 (diff) | |
| parent | 0a99eec958e678e215c54fbf9adc13a9845a1d2a (diff) | |
| download | rust-d1e1aff8c876b97406f89d536e1bf9aa95ff8c83.tar.gz rust-d1e1aff8c876b97406f89d536e1bf9aa95ff8c83.zip | |
Update known problems for default_numeric_fallback (#13794)
The existing known problem is not actually true, and the many false positives and false negatives should be mentioned. Allowing the lint on a single statement: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=328de43690af13ed126f7c00c15cd695 changelog: [`default_numeric_fallback`]: update known problems docs
| -rw-r--r-- | clippy_lints/src/default_numeric_fallback.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clippy_lints/src/default_numeric_fallback.rs b/clippy_lints/src/default_numeric_fallback.rs index ef6b141920d..c3f907ee7fb 100644 --- a/clippy_lints/src/default_numeric_fallback.rs +++ b/clippy_lints/src/default_numeric_fallback.rs @@ -26,7 +26,8 @@ declare_clippy_lint! { /// To ensure that every numeric type is chosen explicitly rather than implicitly. /// /// ### Known problems - /// This lint can only be allowed at the function level or above. + /// This lint is implemented using a custom algorithm independent of rustc's inference, + /// which results in many false positives and false negatives. /// /// ### Example /// ```no_run @@ -36,8 +37,8 @@ declare_clippy_lint! { /// /// Use instead: /// ```no_run - /// let i = 10i32; - /// let f = 1.23f64; + /// let i = 10_i32; + /// let f = 1.23_f64; /// ``` #[clippy::version = "1.52.0"] pub DEFAULT_NUMERIC_FALLBACK, |
