X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftools%2Fclippy%2Fclippy_lints%2Fsrc%2Feta_reduction.rs;h=a5a763c37d1bec0f8d3854ef1bf14ac8ad287a44;hb=7f605496e75141b473827f3b8d5cdeb17e9f3408;hp=197cac86a57d6d1772c2f44ef50d4cc4dcc2924a;hpb=c3605f8c8020dbbe8f0d1961c7b33c4c4b78ad0d;p=rust.git diff --git a/src/tools/clippy/clippy_lints/src/eta_reduction.rs b/src/tools/clippy/clippy_lints/src/eta_reduction.rs index 197cac86a57..a5a763c37d1 100644 --- a/src/tools/clippy/clippy_lints/src/eta_reduction.rs +++ b/src/tools/clippy/clippy_lints/src/eta_reduction.rs @@ -34,14 +34,14 @@ /// /// ### Example /// ```rust,ignore - /// // Bad /// xs.map(|x| foo(x)) + /// ``` /// - /// // Good + /// Use instead: + /// ```rust,ignore + /// // where `foo(_)` is a plain function that takes the exact argument type of `x`. /// xs.map(foo) /// ``` - /// where `foo(_)` is a plain function that takes the exact argument type of - /// `x`. #[clippy::version = "pre 1.29.0"] pub REDUNDANT_CLOSURE, style,