From a9b468f2b51a251d0d718059299d0ccd0e561389 Mon Sep 17 00:00:00 2001 From: Alessio Cosenza Date: Mon, 29 May 2023 11:24:36 +0200 Subject: [PATCH] Add `Limitations` section --- clippy_lints/src/redundant_type_annotations.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/clippy_lints/src/redundant_type_annotations.rs b/clippy_lints/src/redundant_type_annotations.rs index 18647891ac6..8e9234bba3c 100644 --- a/clippy_lints/src/redundant_type_annotations.rs +++ b/clippy_lints/src/redundant_type_annotations.rs @@ -13,6 +13,14 @@ declare_clippy_lint! { /// Code without type annotations is shorter and in most cases /// more idiomatic and easier to modify. /// + /// ### Limitations + /// This lint doesn't support: + /// + /// - Generics + /// - Refs returned from anything else than a `MethodCall` + /// - Complex types (tuples, arrays, etc...) + /// - `Path` to anything else than a primitive type. + /// /// ### Example /// ```rust /// let foo: String = String::new();