]> git.lizzy.rs Git - rust.git/commitdiff
update the lint messages and tests
authorMatthias Krüger <matthias.krueger@famsik.de>
Wed, 24 Feb 2021 13:02:51 +0000 (14:02 +0100)
committerMatthias Krüger <matthias.krueger@famsik.de>
Sun, 28 Feb 2021 01:22:05 +0000 (02:22 +0100)
54 files changed:
clippy_lints/src/assign_ops.rs
clippy_lints/src/attrs.rs
clippy_lints/src/await_holding_invalid.rs
clippy_lints/src/comparison_chain.rs
clippy_lints/src/drop_forget_ref.rs
clippy_lints/src/fallible_impl_from.rs
clippy_lints/src/indexing_slicing.rs
clippy_lints/src/integer_division.rs
clippy_lints/src/loops.rs
clippy_lints/src/matches.rs
clippy_lints/src/methods/mod.rs
clippy_lints/src/methods/unnecessary_lazy_eval.rs
clippy_lints/src/misc.rs
clippy_lints/src/needless_question_mark.rs
clippy_lints/src/ptr.rs
clippy_lints/src/suspicious_operation_groupings.rs
clippy_lints/src/transmuting_null.rs
clippy_lints/src/types.rs
clippy_lints/src/zero_div_zero.rs
tests/lint_message_convention.rs
tests/ui-toml/vec_box_sized/test.stderr
tests/ui/assign_ops2.stderr
tests/ui/await_holding_lock.stderr
tests/ui/await_holding_refcell_ref.stderr
tests/ui/box_vec.stderr
tests/ui/comparison_chain.stderr
tests/ui/drop_forget_copy.stderr
tests/ui/drop_ref.stderr
tests/ui/explicit_counter_loop.stderr
tests/ui/fallible_impl_from.stderr
tests/ui/filter_map_next.stderr
tests/ui/filter_map_next_fixable.stderr
tests/ui/for_loops_over_fallibles.stderr
tests/ui/forget_ref.stderr
tests/ui/indexing_slicing_index.stderr
tests/ui/indexing_slicing_slice.stderr
tests/ui/integer_division.stderr
tests/ui/methods.stderr
tests/ui/methods_fixable.stderr
tests/ui/mismatched_target_os_unix.stderr
tests/ui/needless_collect_indirect.stderr
tests/ui/needless_question_mark.stderr
tests/ui/needless_range_loop.stderr
tests/ui/needless_range_loop2.stderr
tests/ui/ptr_arg.stderr
tests/ui/suspicious_operation_groupings.stderr
tests/ui/toplevel_ref_arg_non_rustfix.stderr
tests/ui/transmuting_null.stderr
tests/ui/unnecessary_lazy_eval.stderr
tests/ui/unnecessary_lazy_eval_unfixable.stderr
tests/ui/used_underscore_binding.stderr
tests/ui/vec_box_sized.stderr
tests/ui/wild_in_or_pats.stderr
tests/ui/zero_div_zero.stderr

index b3185b88840142253648eb1eb033dca657d20aa6..e13f62d04281ac3cbfc5602a04ef4e3db3b0d5e1 100644 (file)
@@ -209,7 +209,7 @@ fn lint_misrefactored_assign_op(
                 diag.span_suggestion(
                     expr.span,
                     &format!(
-                        "Did you mean `{} = {} {} {}` or `{}`? Consider replacing it with",
+                        "did you mean `{} = {} {} {}` or `{}`? Consider replacing it with",
                         snip_a,
                         snip_a,
                         op.node.as_str(),
index 652d1fa16b6dedc30635d8d7b0bdb14d51cfb963..bb7be3d472429a3ba4e868c3d4af1d162862e06f 100644 (file)
@@ -639,7 +639,7 @@ fn find_mismatched_target_os(items: &[NestedMetaItem]) -> Vec<(&str, Span)> {
                     diag.span_suggestion(span, "try", sugg, Applicability::MaybeIncorrect);
 
                     if !unix_suggested && is_unix(os) {
-                        diag.help("Did you mean `unix`?");
+                        diag.help("did you mean `unix`?");
                         unix_suggested = true;
                     }
                 }
index ae64c688744542512bb804858aa55c873a805066..fad3aff96cc82c9377fd47916da6704ea9208dbf 100644 (file)
@@ -116,7 +116,7 @@ fn check_interior_types(cx: &LateContext<'_>, ty_causes: &[GeneratorInteriorType
                     cx,
                     AWAIT_HOLDING_LOCK,
                     ty_cause.span,
-                    "this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await.",
+                    "this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await",
                     ty_cause.scope_span.or(Some(span)),
                     "these are all the await points this lock is held through",
                 );
@@ -126,7 +126,7 @@ fn check_interior_types(cx: &LateContext<'_>, ty_causes: &[GeneratorInteriorType
                         cx,
                         AWAIT_HOLDING_REFCELL_REF,
                         ty_cause.span,
-                        "this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await.",
+                        "this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await",
                         ty_cause.scope_span.or(Some(span)),
                         "these are all the await points this ref is held through",
                     );
index 90d31dece13113ae9d2c64711211df9b1c67553a..e309db25995fbfa0f8bf5cbe716765047442e269 100644 (file)
@@ -117,7 +117,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
             expr.span,
             "`if` chain can be rewritten with `match`",
             None,
-            "Consider rewriting the `if` chain to use `cmp` and `match`.",
+            "consider rewriting the `if` chain to use `cmp` and `match`",
         )
     }
 }
index a84f9c46287163ece6ddd5ab947e175dd0d5481f..2aea00d883c41c22eeb26515df8f39b7dffc9308 100644 (file)
 }
 
 const DROP_REF_SUMMARY: &str = "calls to `std::mem::drop` with a reference instead of an owned value. \
-                                Dropping a reference does nothing.";
+                                Dropping a reference does nothing";
 const FORGET_REF_SUMMARY: &str = "calls to `std::mem::forget` with a reference instead of an owned value. \
-                                  Forgetting a reference does nothing.";
+                                  Forgetting a reference does nothing";
 const DROP_COPY_SUMMARY: &str = "calls to `std::mem::drop` with a value that implements `Copy`. \
-                                 Dropping a copy leaves the original intact.";
+                                 Dropping a copy leaves the original intact";
 const FORGET_COPY_SUMMARY: &str = "calls to `std::mem::forget` with a value that implements `Copy`. \
-                                   Forgetting a copy leaves the original intact.";
+                                   Forgetting a copy leaves the original intact";
 
 declare_lint_pass!(DropForgetRef => [DROP_REF, FORGET_REF, DROP_COPY, FORGET_COPY]);
 
index 6d522c7ef3398d231cdd10244b2e8c47054b45fd..f466dddc13c2044d7320f04fac2cec42403da220 100644 (file)
@@ -133,7 +133,7 @@ fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
                         move |diag| {
                             diag.help(
                                 "`From` is intended for infallible conversions only. \
-                                Use `TryFrom` if there's a possibility for the conversion to fail.");
+                                Use `TryFrom` if there's a possibility for the conversion to fail");
                             diag.span_note(fpu.result, "potential failure(s)");
                         });
                 }
index 741195f3b10d5eee8f1da6577ec18919b95574b3..c919ec097a2393a5c3c5ea1189e68278c7b54dfe 100644 (file)
@@ -132,13 +132,13 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
                 }
 
                 let help_msg = match (range.start, range.end) {
-                    (None, Some(_)) => "Consider using `.get(..n)`or `.get_mut(..n)` instead",
-                    (Some(_), None) => "Consider using `.get(n..)` or .get_mut(n..)` instead",
-                    (Some(_), Some(_)) => "Consider using `.get(n..m)` or `.get_mut(n..m)` instead",
+                    (None, Some(_)) => "consider using `.get(..n)`or `.get_mut(..n)` instead",
+                    (Some(_), None) => "consider using `.get(n..)` or .get_mut(n..)` instead",
+                    (Some(_), Some(_)) => "consider using `.get(n..m)` or `.get_mut(n..m)` instead",
                     (None, None) => return, // [..] is ok.
                 };
 
-                span_lint_and_help(cx, INDEXING_SLICING, expr.span, "slicing may panic.", None, help_msg);
+                span_lint_and_help(cx, INDEXING_SLICING, expr.span, "slicing may panic", None, help_msg);
             } else {
                 // Catchall non-range index, i.e., [n] or [n << m]
                 if let ty::Array(..) = ty.kind() {
@@ -153,9 +153,9 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
                     cx,
                     INDEXING_SLICING,
                     expr.span,
-                    "indexing may panic.",
+                    "indexing may panic",
                     None,
-                    "Consider using `.get(n)` or `.get_mut(n)` instead",
+                    "consider using `.get(n)` or `.get_mut(n)` instead",
                 );
             }
         }
index 31181c10d23dbed70a1927e5bba2d3b0ada51069..39b4605e72f103b6024bcbc03c02c15fb2d77dc3 100644 (file)
@@ -39,7 +39,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) {
                 expr.span,
                 "integer division",
                 None,
-                "division of integers may cause loss of precision. consider using floats.",
+                "division of integers may cause loss of precision. consider using floats",
             );
         }
     }
index 1c9373a756c8896d3de7472131aa8839f3d16206..3ff9e1821210626f9e5ad6c0630a5c383f15c444 100644 (file)
@@ -1625,10 +1625,7 @@ fn check_for_loop_range<'tcx>(
                         cx,
                         NEEDLESS_RANGE_LOOP,
                         expr.span,
-                        &format!(
-                            "the loop variable `{}` is only used to index `{}`.",
-                            ident.name, indexed
-                        ),
+                        &format!("the loop variable `{}` is only used to index `{}`", ident.name, indexed),
                         |diag| {
                             multispan_sugg(
                                 diag,
@@ -1763,7 +1760,7 @@ fn check_arg_type(cx: &LateContext<'_>, pat: &Pat<'_>, arg: &Expr<'_>) {
             arg.span,
             &format!(
                 "for loop over `{0}`, which is an `Option`. This is more readably written as an \
-                `if let` statement.",
+                `if let` statement",
                 snippet(cx, arg.span, "_")
             ),
             None,
@@ -1780,7 +1777,7 @@ fn check_arg_type(cx: &LateContext<'_>, pat: &Pat<'_>, arg: &Expr<'_>) {
             arg.span,
             &format!(
                 "for loop over `{0}`, which is a `Result`. This is more readably written as an \
-                `if let` statement.",
+                `if let` statement",
                 snippet(cx, arg.span, "_")
             ),
             None,
@@ -1826,7 +1823,7 @@ fn check_for_loop_explicit_counter<'tcx>(
                         cx,
                         EXPLICIT_COUNTER_LOOP,
                         for_span.with_hi(arg.span.hi()),
-                        &format!("the variable `{}` is used as a loop counter.", name),
+                        &format!("the variable `{}` is used as a loop counter", name),
                         "consider using",
                         format!(
                             "for ({}, {}) in {}.enumerate()",
@@ -3055,16 +3052,16 @@ fn get_iter_method(&self, cx: &LateContext<'_>) -> String {
     fn get_suggestion_text(&self) -> &'static str {
         match &self.func {
             IterFunctionKind::IntoIter => {
-                "Use the original Iterator instead of collecting it and then producing a new one"
+                "use the original Iterator instead of collecting it and then producing a new one"
             },
             IterFunctionKind::Len => {
-                "Take the original Iterator's count instead of collecting it and finding the length"
+                "take the original Iterator's count instead of collecting it and finding the length"
             },
             IterFunctionKind::IsEmpty => {
-                "Check if the original Iterator has anything instead of collecting it and seeing if it's empty"
+                "check if the original Iterator has anything instead of collecting it and seeing if it's empty"
             },
             IterFunctionKind::Contains(_) => {
-                "Check if the original Iterator contains an element instead of collecting then checking"
+                "check if the original Iterator contains an element instead of collecting then checking"
             },
         }
     }
index efc8b13942507dc408df040a4d281aae391d7268..0d79ffbe944e54ca5f66dd964960519b7ad8c936 100644 (file)
@@ -1173,9 +1173,9 @@ fn check_wild_in_or_pats(cx: &LateContext<'_>, arms: &[Arm<'_>]) {
                     cx,
                     WILDCARD_IN_OR_PATTERNS,
                     arm.pat.span,
-                    "wildcard pattern covers any other pattern as it will match anyway.",
+                    "wildcard pattern covers any other pattern as it will match anyway",
                     None,
-                    "Consider handling `_` separately.",
+                    "consider handling `_` separately",
                 );
             }
         }
index 6f491144435ac118b7ff94fef20f85194a95c7d2..f5c01ac772987bb8e2eb2de9ab418d18ca4ec51e 100644 (file)
@@ -3081,7 +3081,7 @@ fn lint_filter_next<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>, fil
     // lint if caller of `.filter().next()` is an Iterator
     if match_trait_method(cx, expr, &paths::ITERATOR) {
         let msg = "called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling \
-                   `.find(..)` instead.";
+                   `.find(..)` instead";
         let filter_snippet = snippet(cx, filter_args[1].span, "..");
         if filter_snippet.lines().count() <= 1 {
             let iter_snippet = snippet(cx, filter_args[0].span, "..");
@@ -3209,7 +3209,7 @@ fn lint_filter_map_next<'tcx>(
         }
 
         let msg = "called `filter_map(..).next()` on an `Iterator`. This is more succinctly expressed by calling \
-                   `.find_map(..)` instead.";
+                   `.find_map(..)` instead";
         let filter_snippet = snippet(cx, filter_args[1].span, "..");
         if filter_snippet.lines().count() <= 1 {
             let iter_snippet = snippet(cx, filter_args[0].span, "..");
index a867bdb326d722dfc0c089fda2fa6f8b6adc71d2..40ccb8c80b342aa758a3e905b748d147b0a3640f 100644 (file)
@@ -50,7 +50,7 @@ pub(super) fn lint<'tcx>(
                     UNNECESSARY_LAZY_EVALUATIONS,
                     expr.span,
                     msg,
-                    &format!("Use `{}` instead", simplify_using),
+                    &format!("use `{}` instead", simplify_using),
                     format!(
                         "{0}.{1}({2})",
                         snippet(cx, args[0].span, ".."),
index 2ef5c6aa2a4e2a8b39c2d8e38a622a7c2f5c4ec4..12f91d7bf639b320793447aa31ca1d70f8096641 100644 (file)
@@ -292,7 +292,7 @@ fn check_fn(
                     TOPLEVEL_REF_ARG,
                     arg.pat.span,
                     "`ref` directly on a function argument is ignored. \
-                    Consider using a reference type instead.",
+                    Consider using a reference type instead",
                 );
             }
         }
@@ -422,7 +422,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
                 expr.span,
                 &format!(
                     "used binding `{}` which is prefixed with an underscore. A leading \
-                     underscore signals that a binding will not be used.",
+                     underscore signals that a binding will not be used",
                     binding
                 ),
             );
index fe8d4d07abc15ae8a062e313c766a93c6c065bea..a3293f1b3614925d017d33ce0e4a8546c0e92ef4 100644 (file)
@@ -142,7 +142,7 @@ fn emit_lint(cx: &LateContext<'_>, expr: &SomeOkCall<'_>) {
         cx,
         NEEDLESS_QUESTION_MARK,
         entire_expr.span,
-        "Question mark operator is useless here",
+        "question mark operator is useless here",
         "try",
         format!("{}", utils::snippet(cx, inner_expr.span, r#""...""#)),
         Applicability::MachineApplicable,
index de2fb8decb7150c42c53320715850be09d6a1033..5474fdf30bfaf6bad24c7685ec6e2dcf1f91dbad 100644 (file)
@@ -188,7 +188,7 @@ fn check_fn(cx: &LateContext<'_>, decl: &FnDecl<'_>, fn_id: HirId, opt_body_id:
                         PTR_ARG,
                         arg.span,
                         "writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used \
-                         with non-Vec-based slices.",
+                         with non-Vec-based slices",
                         |diag| {
                             if let Some(ref snippet) = get_only_generic_arg_snippet(cx, arg) {
                                 diag.span_suggestion(
@@ -217,7 +217,7 @@ fn check_fn(cx: &LateContext<'_>, decl: &FnDecl<'_>, fn_id: HirId, opt_body_id:
                         cx,
                         PTR_ARG,
                         arg.span,
-                        "writing `&String` instead of `&str` involves a new object where a slice will do.",
+                        "writing `&String` instead of `&str` involves a new object where a slice will do",
                         |diag| {
                             diag.span_suggestion(arg.span, "change this to", "&str".into(), Applicability::Unspecified);
                             for (clonespan, suggestion) in spans {
@@ -239,7 +239,7 @@ fn check_fn(cx: &LateContext<'_>, decl: &FnDecl<'_>, fn_id: HirId, opt_body_id:
                         cx,
                         PTR_ARG,
                         arg.span,
-                        "writing `&PathBuf` instead of `&Path` involves a new object where a slice will do.",
+                        "writing `&PathBuf` instead of `&Path` involves a new object where a slice will do",
                         |diag| {
                             diag.span_suggestion(
                                 arg.span,
@@ -278,7 +278,7 @@ fn check_fn(cx: &LateContext<'_>, decl: &FnDecl<'_>, fn_id: HirId, opt_body_id:
                                 cx,
                                 PTR_ARG,
                                 arg.span,
-                                "using a reference to `Cow` is not recommended.",
+                                "using a reference to `Cow` is not recommended",
                                 "change this to",
                                 "&".to_owned() + &r,
                                 Applicability::Unspecified,
index cccd24ccf9401eaca5085f88601deb18f0dc9189..2ff30698043dc10e852c69c47b88b7fb5d9dbed3 100644 (file)
@@ -261,7 +261,7 @@ fn emit_suggestion(cx: &EarlyContext<'_>, span: Span, sugg: String, applicabilit
         cx,
         SUSPICIOUS_OPERATION_GROUPINGS,
         span,
-        "This sequence of operators looks suspiciously like a bug.",
+        "this sequence of operators looks suspiciously like a bug",
         "I think you meant",
         sugg,
         applicability,
index 6b171a0fa1af2ef2058f402837237f957153908f..2ba2b646f004fba256c2d05cf061ce2f2bdd6e80 100644 (file)
@@ -27,7 +27,7 @@
 
 declare_lint_pass!(TransmutingNull => [TRANSMUTING_NULL]);
 
-const LINT_MSG: &str = "transmuting a known null pointer into a reference.";
+const LINT_MSG: &str = "transmuting a known null pointer into a reference";
 
 impl<'tcx> LateLintPass<'tcx> for TransmutingNull {
     fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
index af8d6865f93aae3c28ec59566e823d5ff37ff484..a18cba6fb44bdc8dba78786285765f6fe3c4058f 100644 (file)
@@ -388,7 +388,7 @@ fn check_ty(&mut self, cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, is_local: boo
                                 hir_ty.span,
                                 "you seem to be trying to use `Box<Vec<T>>`. Consider using just `Vec<T>`",
                                 None,
-                                "`Vec<T>` is already on the heap, `Box<Vec<T>>` makes an extra allocation.",
+                                "`Vec<T>` is already on the heap, `Box<Vec<T>>` makes an extra allocation",
                             );
                             return; // don't recurse into the type
                         }
@@ -554,7 +554,7 @@ fn check_ty(&mut self, cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, is_local: boo
                                     cx,
                                     VEC_BOX,
                                     hir_ty.span,
-                                    "`Vec<T>` is already on the heap, the boxing is unnecessary.",
+                                    "`Vec<T>` is already on the heap, the boxing is unnecessary",
                                     "try",
                                     format!("Vec<{}>", snippet(cx, boxed_ty.span, "..")),
                                     Applicability::MachineApplicable,
index 4b81a27632d8d03df056ef17a1a48b79b7f39bed..11d96e15ff1512914717e6d8af61c62f42e7ff64 100644 (file)
@@ -55,7 +55,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
                     "constant division of `0.0` with `0.0` will always result in NaN",
                     None,
                     &format!(
-                        "Consider using `{}::NAN` if you would like a constant representing NaN",
+                        "consider using `{}::NAN` if you would like a constant representing NaN",
                         float_type,
                     ),
                 );
index 493bd3bf56bb62f600cd3be8c5bf52f3501f1d9d..e316a884996d4a43373db8dc87030356f3bcadb5 100644 (file)
@@ -38,8 +38,11 @@ fn new(path: PathBuf) -> Self {
             r".*the arguments may be inverted...",
             r".*Intel x86 assembly syntax used",
             r".*AT&T x86 assembly syntax used",
-            r".*remove .* the return type...",
+            r".*remove .*the return type...",
             r"note: Clippy version: .*",
+            r"the compiler unexpectedly panicked. this is a bug.",
+            r".*help: I think you meant: .*",
+            r"Iterator.* will panic at runtime",
         ])
         .unwrap();
 
@@ -96,7 +99,7 @@ fn lint_message_convention() {
 
     eprintln!("\n\n\nLint message should not start with a capital letter and should not have punctuation at the end of the message unless multiple sentences are needed.");
     eprintln!("Check out the rustc-dev-guide for more information:");
-    eprintln!("https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-structure");
+    eprintln!("https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-structure\n\n\n");
 
     assert!(bad_tests.is_empty());
 }
index 3bdeca0bc8774a77fdd77f42f0ccdfd23fc03bc5..cf194de3c55375f2aba1422fcf45527846678180 100644 (file)
@@ -1,4 +1,4 @@
-error: `Vec<T>` is already on the heap, the boxing is unnecessary.
+error: `Vec<T>` is already on the heap, the boxing is unnecessary
   --> $DIR/test.rs:9:12
    |
 LL | struct Foo(Vec<Box<u8>>);
@@ -6,13 +6,13 @@ LL | struct Foo(Vec<Box<u8>>);
    |
    = note: `-D clippy::vec-box` implied by `-D warnings`
 
-error: `Vec<T>` is already on the heap, the boxing is unnecessary.
+error: `Vec<T>` is already on the heap, the boxing is unnecessary
   --> $DIR/test.rs:10:12
    |
 LL | struct Bar(Vec<Box<u32>>);
    |            ^^^^^^^^^^^^^ help: try: `Vec<u32>`
 
-error: `Vec<T>` is already on the heap, the boxing is unnecessary.
+error: `Vec<T>` is already on the heap, the boxing is unnecessary
   --> $DIR/test.rs:13:18
    |
 LL | struct FooBarBaz(Vec<Box<C>>);
index 70b15d18a568b878ea39cb6c2efe9869b1285828..e40668ed339f2ef40bf41e80d0fab5c881427110 100644 (file)
@@ -5,7 +5,7 @@ LL |     a += a + 1;
    |     ^^^^^^^^^^
    |
    = note: `-D clippy::misrefactored-assign-op` implied by `-D warnings`
-help: Did you mean `a = a + 1` or `a = a + a + 1`? Consider replacing it with
+help: did you mean `a = a + 1` or `a = a + a + 1`? Consider replacing it with
    |
 LL |     a += 1;
    |     ^^^^^^
@@ -20,7 +20,7 @@ error: variable appears on both sides of an assignment operation
 LL |     a += 1 + a;
    |     ^^^^^^^^^^
    |
-help: Did you mean `a = a + 1` or `a = a + 1 + a`? Consider replacing it with
+help: did you mean `a = a + 1` or `a = a + 1 + a`? Consider replacing it with
    |
 LL |     a += 1;
    |     ^^^^^^
@@ -35,7 +35,7 @@ error: variable appears on both sides of an assignment operation
 LL |     a -= a - 1;
    |     ^^^^^^^^^^
    |
-help: Did you mean `a = a - 1` or `a = a - (a - 1)`? Consider replacing it with
+help: did you mean `a = a - 1` or `a = a - (a - 1)`? Consider replacing it with
    |
 LL |     a -= 1;
    |     ^^^^^^
@@ -50,7 +50,7 @@ error: variable appears on both sides of an assignment operation
 LL |     a *= a * 99;
    |     ^^^^^^^^^^^
    |
-help: Did you mean `a = a * 99` or `a = a * a * 99`? Consider replacing it with
+help: did you mean `a = a * 99` or `a = a * a * 99`? Consider replacing it with
    |
 LL |     a *= 99;
    |     ^^^^^^^
@@ -65,7 +65,7 @@ error: variable appears on both sides of an assignment operation
 LL |     a *= 42 * a;
    |     ^^^^^^^^^^^
    |
-help: Did you mean `a = a * 42` or `a = a * 42 * a`? Consider replacing it with
+help: did you mean `a = a * 42` or `a = a * 42 * a`? Consider replacing it with
    |
 LL |     a *= 42;
    |     ^^^^^^^
@@ -80,7 +80,7 @@ error: variable appears on both sides of an assignment operation
 LL |     a /= a / 2;
    |     ^^^^^^^^^^
    |
-help: Did you mean `a = a / 2` or `a = a / (a / 2)`? Consider replacing it with
+help: did you mean `a = a / 2` or `a = a / (a / 2)`? Consider replacing it with
    |
 LL |     a /= 2;
    |     ^^^^^^
@@ -95,7 +95,7 @@ error: variable appears on both sides of an assignment operation
 LL |     a %= a % 5;
    |     ^^^^^^^^^^
    |
-help: Did you mean `a = a % 5` or `a = a % (a % 5)`? Consider replacing it with
+help: did you mean `a = a % 5` or `a = a % (a % 5)`? Consider replacing it with
    |
 LL |     a %= 5;
    |     ^^^^^^
@@ -110,7 +110,7 @@ error: variable appears on both sides of an assignment operation
 LL |     a &= a & 1;
    |     ^^^^^^^^^^
    |
-help: Did you mean `a = a & 1` or `a = a & a & 1`? Consider replacing it with
+help: did you mean `a = a & 1` or `a = a & a & 1`? Consider replacing it with
    |
 LL |     a &= 1;
    |     ^^^^^^
@@ -125,7 +125,7 @@ error: variable appears on both sides of an assignment operation
 LL |     a *= a * a;
    |     ^^^^^^^^^^
    |
-help: Did you mean `a = a * a` or `a = a * a * a`? Consider replacing it with
+help: did you mean `a = a * a` or `a = a * a * a`? Consider replacing it with
    |
 LL |     a *= a;
    |     ^^^^^^
index 21bf49d16f04877d862ff702ef527575cd537d2f..a5fcff7e0e44363f02087f6c87fdfacc46638734 100644 (file)
@@ -1,4 +1,4 @@
-error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await.
+error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
   --> $DIR/await_holding_lock.rs:7:9
    |
 LL |     let guard = x.lock().unwrap();
@@ -13,7 +13,7 @@ LL | |     baz().await
 LL | | }
    | |_^
 
-error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await.
+error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
   --> $DIR/await_holding_lock.rs:28:9
    |
 LL |     let guard = x.lock().unwrap();
@@ -31,7 +31,7 @@ LL | |     first + second + third
 LL | | }
    | |_^
 
-error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await.
+error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
   --> $DIR/await_holding_lock.rs:41:13
    |
 LL |         let guard = x.lock().unwrap();
@@ -45,7 +45,7 @@ LL | |         baz().await
 LL | |     };
    | |_____^
 
-error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await.
+error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
   --> $DIR/await_holding_lock.rs:53:13
    |
 LL |         let guard = x.lock().unwrap();
index b504f0454913634969cb11a6ced5b3fc5e9fb2f9..55e41dbca96f834046b43c624e377ddcb6bbb6d3 100644 (file)
@@ -1,4 +1,4 @@
-error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await.
+error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await
   --> $DIR/await_holding_refcell_ref.rs:7:9
    |
 LL |     let b = x.borrow();
@@ -13,7 +13,7 @@ LL | |     baz().await
 LL | | }
    | |_^
 
-error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await.
+error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await
   --> $DIR/await_holding_refcell_ref.rs:12:9
    |
 LL |     let b = x.borrow_mut();
@@ -27,7 +27,7 @@ LL | |     baz().await
 LL | | }
    | |_^
 
-error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await.
+error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await
   --> $DIR/await_holding_refcell_ref.rs:33:9
    |
 LL |     let b = x.borrow_mut();
@@ -45,7 +45,7 @@ LL | |     first + second + third
 LL | | }
    | |_^
 
-error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await.
+error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await
   --> $DIR/await_holding_refcell_ref.rs:45:9
    |
 LL |     let b = x.borrow_mut();
@@ -63,7 +63,7 @@ LL | |     first + second + third
 LL | | }
    | |_^
 
-error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await.
+error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await
   --> $DIR/await_holding_refcell_ref.rs:60:13
    |
 LL |         let b = x.borrow_mut();
@@ -77,7 +77,7 @@ LL | |         baz().await
 LL | |     };
    | |_____^
 
-error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await.
+error: this RefCell Ref is held across an 'await' point. Consider ensuring the Ref is dropped before calling await
   --> $DIR/await_holding_refcell_ref.rs:72:13
    |
 LL |         let b = x.borrow_mut();
index fca12eddd573f04c1721bf2143d235ad2e3a06aa..9b789334baeecb8db138d49f08db25a68509af78 100644 (file)
@@ -5,7 +5,7 @@ LL | pub fn test(foo: Box<Vec<bool>>) {
    |                  ^^^^^^^^^^^^^^
    |
    = note: `-D clippy::box-vec` implied by `-D warnings`
-   = help: `Vec<T>` is already on the heap, `Box<Vec<T>>` makes an extra allocation.
+   = help: `Vec<T>` is already on the heap, `Box<Vec<T>>` makes an extra allocation
 
 error: aborting due to previous error
 
index 69db88b03b5b55d30251dad120febb2fecf7be65..be25a80dde0a199f80741787c8254b1e71e649af 100644 (file)
@@ -9,7 +9,7 @@ LL | |     }
    | |_____^
    |
    = note: `-D clippy::comparison-chain` implied by `-D warnings`
-   = help: Consider rewriting the `if` chain to use `cmp` and `match`.
+   = help: consider rewriting the `if` chain to use `cmp` and `match`
 
 error: `if` chain can be rewritten with `match`
   --> $DIR/comparison_chain.rs:27:5
@@ -23,7 +23,7 @@ LL | |         c()
 LL | |     }
    | |_____^
    |
-   = help: Consider rewriting the `if` chain to use `cmp` and `match`.
+   = help: consider rewriting the `if` chain to use `cmp` and `match`
 
 error: `if` chain can be rewritten with `match`
   --> $DIR/comparison_chain.rs:35:5
@@ -37,7 +37,7 @@ LL | |         c()
 LL | |     }
    | |_____^
    |
-   = help: Consider rewriting the `if` chain to use `cmp` and `match`.
+   = help: consider rewriting the `if` chain to use `cmp` and `match`
 
 error: `if` chain can be rewritten with `match`
   --> $DIR/comparison_chain.rs:43:5
@@ -51,7 +51,7 @@ LL | |         c()
 LL | |     }
    | |_____^
    |
-   = help: Consider rewriting the `if` chain to use `cmp` and `match`.
+   = help: consider rewriting the `if` chain to use `cmp` and `match`
 
 error: `if` chain can be rewritten with `match`
   --> $DIR/comparison_chain.rs:117:5
@@ -63,7 +63,7 @@ LL | |         b()
 LL | |     }
    | |_____^
    |
-   = help: Consider rewriting the `if` chain to use `cmp` and `match`.
+   = help: consider rewriting the `if` chain to use `cmp` and `match`
 
 error: `if` chain can be rewritten with `match`
   --> $DIR/comparison_chain.rs:123:5
@@ -77,7 +77,7 @@ LL | |         c()
 LL | |     }
    | |_____^
    |
-   = help: Consider rewriting the `if` chain to use `cmp` and `match`.
+   = help: consider rewriting the `if` chain to use `cmp` and `match`
 
 error: `if` chain can be rewritten with `match`
   --> $DIR/comparison_chain.rs:131:5
@@ -91,7 +91,7 @@ LL | |         c()
 LL | |     }
    | |_____^
    |
-   = help: Consider rewriting the `if` chain to use `cmp` and `match`.
+   = help: consider rewriting the `if` chain to use `cmp` and `match`
 
 error: aborting due to 7 previous errors
 
index 82a4f047ba858a355de5833a0f715648e61ce0ff..01de0be7caea96cb907223cb49ddce57233d6eef 100644 (file)
@@ -1,4 +1,4 @@
-error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact.
+error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
   --> $DIR/drop_forget_copy.rs:33:5
    |
 LL |     drop(s1);
@@ -11,7 +11,7 @@ note: argument has type SomeStruct
 LL |     drop(s1);
    |          ^^
 
-error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact.
+error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
   --> $DIR/drop_forget_copy.rs:34:5
    |
 LL |     drop(s2);
@@ -23,7 +23,7 @@ note: argument has type SomeStruct
 LL |     drop(s2);
    |          ^^
 
-error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact.
+error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
   --> $DIR/drop_forget_copy.rs:36:5
    |
 LL |     drop(s4);
@@ -35,7 +35,7 @@ note: argument has type SomeStruct
 LL |     drop(s4);
    |          ^^
 
-error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact.
+error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
   --> $DIR/drop_forget_copy.rs:39:5
    |
 LL |     forget(s1);
@@ -48,7 +48,7 @@ note: argument has type SomeStruct
 LL |     forget(s1);
    |            ^^
 
-error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact.
+error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
   --> $DIR/drop_forget_copy.rs:40:5
    |
 LL |     forget(s2);
@@ -60,7 +60,7 @@ note: argument has type SomeStruct
 LL |     forget(s2);
    |            ^^
 
-error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact.
+error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
   --> $DIR/drop_forget_copy.rs:42:5
    |
 LL |     forget(s4);
index 10087cb4820a7ce650ce5f52016d0c615767491e..531849f0680ae7ce424443ae6a2d9c13c34985e1 100644 (file)
@@ -1,4 +1,4 @@
-error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
+error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing
   --> $DIR/drop_ref.rs:11:5
    |
 LL |     drop(&SomeStruct);
@@ -11,7 +11,7 @@ note: argument has type `&SomeStruct`
 LL |     drop(&SomeStruct);
    |          ^^^^^^^^^^^
 
-error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
+error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing
   --> $DIR/drop_ref.rs:14:5
    |
 LL |     drop(&owned1);
@@ -23,7 +23,7 @@ note: argument has type `&SomeStruct`
 LL |     drop(&owned1);
    |          ^^^^^^^
 
-error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
+error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing
   --> $DIR/drop_ref.rs:15:5
    |
 LL |     drop(&&owned1);
@@ -35,7 +35,7 @@ note: argument has type `&&SomeStruct`
 LL |     drop(&&owned1);
    |          ^^^^^^^^
 
-error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
+error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing
   --> $DIR/drop_ref.rs:16:5
    |
 LL |     drop(&mut owned1);
@@ -47,7 +47,7 @@ note: argument has type `&mut SomeStruct`
 LL |     drop(&mut owned1);
    |          ^^^^^^^^^^^
 
-error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
+error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing
   --> $DIR/drop_ref.rs:20:5
    |
 LL |     drop(reference1);
@@ -59,7 +59,7 @@ note: argument has type `&SomeStruct`
 LL |     drop(reference1);
    |          ^^^^^^^^^^
 
-error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
+error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing
   --> $DIR/drop_ref.rs:23:5
    |
 LL |     drop(reference2);
@@ -71,7 +71,7 @@ note: argument has type `&mut SomeStruct`
 LL |     drop(reference2);
    |          ^^^^^^^^^^
 
-error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
+error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing
   --> $DIR/drop_ref.rs:26:5
    |
 LL |     drop(reference3);
@@ -83,7 +83,7 @@ note: argument has type `&SomeStruct`
 LL |     drop(reference3);
    |          ^^^^^^^^^^
 
-error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
+error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing
   --> $DIR/drop_ref.rs:31:5
    |
 LL |     drop(&val);
@@ -95,7 +95,7 @@ note: argument has type `&T`
 LL |     drop(&val);
    |          ^^^^
 
-error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
+error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing
   --> $DIR/drop_ref.rs:39:5
    |
 LL |     std::mem::drop(&SomeStruct);
index 931af46efe663f31ead53ba32bf7d1ce69efaffb..4cbacffe87bf47ce06072b8e263ba772e609258b 100644 (file)
@@ -1,4 +1,4 @@
-error: the variable `_index` is used as a loop counter.
+error: the variable `_index` is used as a loop counter
   --> $DIR/explicit_counter_loop.rs:6:5
    |
 LL |     for _v in &vec {
@@ -6,37 +6,37 @@ LL |     for _v in &vec {
    |
    = note: `-D clippy::explicit-counter-loop` implied by `-D warnings`
 
-error: the variable `_index` is used as a loop counter.
+error: the variable `_index` is used as a loop counter
   --> $DIR/explicit_counter_loop.rs:12:5
    |
 LL |     for _v in &vec {
    |     ^^^^^^^^^^^^^^ help: consider using: `for (_index, _v) in vec.iter().enumerate()`
 
-error: the variable `_index` is used as a loop counter.
+error: the variable `_index` is used as a loop counter
   --> $DIR/explicit_counter_loop.rs:17:5
    |
 LL |     for _v in &mut vec {
    |     ^^^^^^^^^^^^^^^^^^ help: consider using: `for (_index, _v) in vec.iter_mut().enumerate()`
 
-error: the variable `_index` is used as a loop counter.
+error: the variable `_index` is used as a loop counter
   --> $DIR/explicit_counter_loop.rs:22:5
    |
 LL |     for _v in vec {
    |     ^^^^^^^^^^^^^ help: consider using: `for (_index, _v) in vec.into_iter().enumerate()`
 
-error: the variable `count` is used as a loop counter.
+error: the variable `count` is used as a loop counter
   --> $DIR/explicit_counter_loop.rs:61:9
    |
 LL |         for ch in text.chars() {
    |         ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (count, ch) in text.chars().enumerate()`
 
-error: the variable `count` is used as a loop counter.
+error: the variable `count` is used as a loop counter
   --> $DIR/explicit_counter_loop.rs:72:9
    |
 LL |         for ch in text.chars() {
    |         ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (count, ch) in text.chars().enumerate()`
 
-error: the variable `count` is used as a loop counter.
+error: the variable `count` is used as a loop counter
   --> $DIR/explicit_counter_loop.rs:130:9
    |
 LL |         for _i in 3..10 {
index f787b30bdabc557641a968518485a53abcb72b7a..a938d234fa07b0cad80a8eb012c655eb452684b7 100644 (file)
@@ -13,7 +13,7 @@ note: the lint level is defined here
    |
 LL | #![deny(clippy::fallible_impl_from)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail.
+   = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
 note: potential failure(s)
   --> $DIR/fallible_impl_from.rs:7:13
    |
@@ -32,7 +32,7 @@ LL | |     }
 LL | | }
    | |_^
    |
-   = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail.
+   = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
 note: potential failure(s)
   --> $DIR/fallible_impl_from.rs:29:13
    |
@@ -52,7 +52,7 @@ LL | |     }
 LL | | }
    | |_^
    |
-   = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail.
+   = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
 note: potential failure(s)
   --> $DIR/fallible_impl_from.rs:37:17
    |
@@ -79,7 +79,7 @@ LL | |     }
 LL | | }
    | |_^
    |
-   = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail.
+   = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
 note: potential failure(s)
   --> $DIR/fallible_impl_from.rs:55:12
    |
index 45427684d96e1c058ec0c0a25e31e64ed3af2852..ddc982c93fe6d9838affcb89844978ce09fee1fb 100644 (file)
@@ -1,4 +1,4 @@
-error: called `filter_map(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find_map(..)` instead.
+error: called `filter_map(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find_map(..)` instead
   --> $DIR/filter_map_next.rs:7:26
    |
 LL |       let _: Option<u32> = vec![1, 2, 3, 4, 5, 6]
index 6c2530e0379e4fded306cb600956b395a3affb42..3bb062ffd7a32ab6f20b66770a58963c4ec1e564 100644 (file)
@@ -1,4 +1,4 @@
-error: called `filter_map(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find_map(..)` instead.
+error: called `filter_map(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find_map(..)` instead
   --> $DIR/filter_map_next_fixable.rs:8:32
    |
 LL |     let element: Option<i32> = a.iter().filter_map(|s| s.parse().ok()).next();
index bef228d4b93afbcaaff12e6cab7537ca068af694..52b94875aec4d9cf483dee622a0f0cf31cfaf637 100644 (file)
@@ -1,4 +1,4 @@
-error: for loop over `option`, which is an `Option`. This is more readably written as an `if let` statement.
+error: for loop over `option`, which is an `Option`. This is more readably written as an `if let` statement
   --> $DIR/for_loops_over_fallibles.rs:9:14
    |
 LL |     for x in option {
@@ -7,7 +7,7 @@ LL |     for x in option {
    = note: `-D clippy::for-loops-over-fallibles` implied by `-D warnings`
    = help: consider replacing `for x in option` with `if let Some(x) = option`
 
-error: for loop over `result`, which is a `Result`. This is more readably written as an `if let` statement.
+error: for loop over `result`, which is a `Result`. This is more readably written as an `if let` statement
   --> $DIR/for_loops_over_fallibles.rs:14:14
    |
 LL |     for x in result {
@@ -15,7 +15,7 @@ LL |     for x in result {
    |
    = help: consider replacing `for x in result` with `if let Ok(x) = result`
 
-error: for loop over `option.ok_or("x not found")`, which is a `Result`. This is more readably written as an `if let` statement.
+error: for loop over `option.ok_or("x not found")`, which is a `Result`. This is more readably written as an `if let` statement
   --> $DIR/for_loops_over_fallibles.rs:18:14
    |
 LL |     for x in option.ok_or("x not found") {
@@ -31,7 +31,7 @@ LL |     for x in v.iter().next() {
    |
    = note: `#[deny(clippy::iter_next_loop)]` on by default
 
-error: for loop over `v.iter().next().and(Some(0))`, which is an `Option`. This is more readably written as an `if let` statement.
+error: for loop over `v.iter().next().and(Some(0))`, which is an `Option`. This is more readably written as an `if let` statement
   --> $DIR/for_loops_over_fallibles.rs:29:14
    |
 LL |     for x in v.iter().next().and(Some(0)) {
@@ -39,7 +39,7 @@ LL |     for x in v.iter().next().and(Some(0)) {
    |
    = help: consider replacing `for x in v.iter().next().and(Some(0))` with `if let Some(x) = v.iter().next().and(Some(0))`
 
-error: for loop over `v.iter().next().ok_or("x not found")`, which is a `Result`. This is more readably written as an `if let` statement.
+error: for loop over `v.iter().next().ok_or("x not found")`, which is a `Result`. This is more readably written as an `if let` statement
   --> $DIR/for_loops_over_fallibles.rs:33:14
    |
 LL |     for x in v.iter().next().ok_or("x not found") {
index b2c7f2023bfbf47519d00125d17da0babb767022..73409388ed16ad0ae9adf9006788a747a26dac31 100644 (file)
@@ -1,4 +1,4 @@
-error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
+error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing
   --> $DIR/forget_ref.rs:10:5
    |
 LL |     forget(&SomeStruct);
@@ -11,7 +11,7 @@ note: argument has type `&SomeStruct`
 LL |     forget(&SomeStruct);
    |            ^^^^^^^^^^^
 
-error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
+error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing
   --> $DIR/forget_ref.rs:13:5
    |
 LL |     forget(&owned);
@@ -23,7 +23,7 @@ note: argument has type `&SomeStruct`
 LL |     forget(&owned);
    |            ^^^^^^
 
-error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
+error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing
   --> $DIR/forget_ref.rs:14:5
    |
 LL |     forget(&&owned);
@@ -35,7 +35,7 @@ note: argument has type `&&SomeStruct`
 LL |     forget(&&owned);
    |            ^^^^^^^
 
-error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
+error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing
   --> $DIR/forget_ref.rs:15:5
    |
 LL |     forget(&mut owned);
@@ -47,7 +47,7 @@ note: argument has type `&mut SomeStruct`
 LL |     forget(&mut owned);
    |            ^^^^^^^^^^
 
-error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
+error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing
   --> $DIR/forget_ref.rs:19:5
    |
 LL |     forget(&*reference1);
@@ -59,7 +59,7 @@ note: argument has type `&SomeStruct`
 LL |     forget(&*reference1);
    |            ^^^^^^^^^^^^
 
-error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
+error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing
   --> $DIR/forget_ref.rs:22:5
    |
 LL |     forget(reference2);
@@ -71,7 +71,7 @@ note: argument has type `&mut SomeStruct`
 LL |     forget(reference2);
    |            ^^^^^^^^^^
 
-error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
+error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing
   --> $DIR/forget_ref.rs:25:5
    |
 LL |     forget(reference3);
@@ -83,7 +83,7 @@ note: argument has type `&SomeStruct`
 LL |     forget(reference3);
    |            ^^^^^^^^^^
 
-error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
+error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing
   --> $DIR/forget_ref.rs:30:5
    |
 LL |     forget(&val);
@@ -95,7 +95,7 @@ note: argument has type `&T`
 LL |     forget(&val);
    |            ^^^^
 
-error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
+error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing
   --> $DIR/forget_ref.rs:38:5
    |
 LL |     std::mem::forget(&SomeStruct);
index 2f6c9e2f4e5a09c4f4d38913515f255c19850d08..76ecec3348400f98e02de0356d316a619061c261 100644 (file)
@@ -1,51 +1,51 @@
-error: indexing may panic.
+error: indexing may panic
   --> $DIR/indexing_slicing_index.rs:10:5
    |
 LL |     x[index];
    |     ^^^^^^^^
    |
    = note: `-D clippy::indexing-slicing` implied by `-D warnings`
-   = help: Consider using `.get(n)` or `.get_mut(n)` instead
+   = help: consider using `.get(n)` or `.get_mut(n)` instead
 
-error: indexing may panic.
+error: indexing may panic
   --> $DIR/indexing_slicing_index.rs:22:5
    |
 LL |     v[0];
    |     ^^^^
    |
-   = help: Consider using `.get(n)` or `.get_mut(n)` instead
+   = help: consider using `.get(n)` or `.get_mut(n)` instead
 
-error: indexing may panic.
+error: indexing may panic
   --> $DIR/indexing_slicing_index.rs:23:5
    |
 LL |     v[10];
    |     ^^^^^
    |
-   = help: Consider using `.get(n)` or `.get_mut(n)` instead
+   = help: consider using `.get(n)` or `.get_mut(n)` instead
 
-error: indexing may panic.
+error: indexing may panic
   --> $DIR/indexing_slicing_index.rs:24:5
    |
 LL |     v[1 << 3];
    |     ^^^^^^^^^
    |
-   = help: Consider using `.get(n)` or `.get_mut(n)` instead
+   = help: consider using `.get(n)` or `.get_mut(n)` instead
 
-error: indexing may panic.
+error: indexing may panic
   --> $DIR/indexing_slicing_index.rs:30:5
    |
 LL |     v[N];
    |     ^^^^
    |
-   = help: Consider using `.get(n)` or `.get_mut(n)` instead
+   = help: consider using `.get(n)` or `.get_mut(n)` instead
 
-error: indexing may panic.
+error: indexing may panic
   --> $DIR/indexing_slicing_index.rs:31:5
    |
 LL |     v[M];
    |     ^^^^
    |
-   = help: Consider using `.get(n)` or `.get_mut(n)` instead
+   = help: consider using `.get(n)` or `.get_mut(n)` instead
 
 error: aborting due to 6 previous errors
 
index 2231deee833ee362be885eaaf0a7ed3d321209a2..f70722b92a5b8186738a754850e171e3e8e93c42 100644 (file)
@@ -1,51 +1,51 @@
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:12:6
    |
 LL |     &x[index..];
    |      ^^^^^^^^^^
    |
    = note: `-D clippy::indexing-slicing` implied by `-D warnings`
-   = help: Consider using `.get(n..)` or .get_mut(n..)` instead
+   = help: consider using `.get(n..)` or .get_mut(n..)` instead
 
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:13:6
    |
 LL |     &x[..index];
    |      ^^^^^^^^^^
    |
-   = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
+   = help: consider using `.get(..n)`or `.get_mut(..n)` instead
 
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:14:6
    |
 LL |     &x[index_from..index_to];
    |      ^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = help: Consider using `.get(n..m)` or `.get_mut(n..m)` instead
+   = help: consider using `.get(n..m)` or `.get_mut(n..m)` instead
 
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:15:6
    |
 LL |     &x[index_from..][..index_to]; // Two lint reports, one for [index_from..] and another for [..index_to].
    |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
+   = help: consider using `.get(..n)`or `.get_mut(..n)` instead
 
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:15:6
    |
 LL |     &x[index_from..][..index_to]; // Two lint reports, one for [index_from..] and another for [..index_to].
    |      ^^^^^^^^^^^^^^^
    |
-   = help: Consider using `.get(n..)` or .get_mut(n..)` instead
+   = help: consider using `.get(n..)` or .get_mut(n..)` instead
 
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:16:6
    |
 LL |     &x[5..][..10]; // Two lint reports, one for out of bounds [5..] and another for slicing [..10].
    |      ^^^^^^^^^^^^
    |
-   = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
+   = help: consider using `.get(..n)`or `.get_mut(..n)` instead
 
 error: range is out of bounds
   --> $DIR/indexing_slicing_slice.rs:16:8
@@ -55,21 +55,21 @@ LL |     &x[5..][..10]; // Two lint reports, one for out of bounds [5..] and ano
    |
    = note: `-D clippy::out-of-bounds-indexing` implied by `-D warnings`
 
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:17:6
    |
 LL |     &x[0..][..3];
    |      ^^^^^^^^^^^
    |
-   = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
+   = help: consider using `.get(..n)`or `.get_mut(..n)` instead
 
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:18:6
    |
 LL |     &x[1..][..5];
    |      ^^^^^^^^^^^
    |
-   = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
+   = help: consider using `.get(..n)`or `.get_mut(..n)` instead
 
 error: range is out of bounds
   --> $DIR/indexing_slicing_slice.rs:25:12
@@ -83,21 +83,21 @@ error: range is out of bounds
 LL |     &y[..=4];
    |           ^
 
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:31:6
    |
 LL |     &v[10..100];
    |      ^^^^^^^^^^
    |
-   = help: Consider using `.get(n..m)` or `.get_mut(n..m)` instead
+   = help: consider using `.get(n..m)` or `.get_mut(n..m)` instead
 
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:32:6
    |
 LL |     &x[10..][..100]; // Two lint reports, one for [10..] and another for [..100].
    |      ^^^^^^^^^^^^^^
    |
-   = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
+   = help: consider using `.get(..n)`or `.get_mut(..n)` instead
 
 error: range is out of bounds
   --> $DIR/indexing_slicing_slice.rs:32:8
@@ -105,21 +105,21 @@ error: range is out of bounds
 LL |     &x[10..][..100]; // Two lint reports, one for [10..] and another for [..100].
    |        ^^
 
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:33:6
    |
 LL |     &v[10..];
    |      ^^^^^^^
    |
-   = help: Consider using `.get(n..)` or .get_mut(n..)` instead
+   = help: consider using `.get(n..)` or .get_mut(n..)` instead
 
-error: slicing may panic.
+error: slicing may panic
   --> $DIR/indexing_slicing_slice.rs:34:6
    |
 LL |     &v[..100];
    |      ^^^^^^^^
    |
-   = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
+   = help: consider using `.get(..n)`or `.get_mut(..n)` instead
 
 error: aborting due to 16 previous errors
 
index 72a232ef3d75085ecddb056be72f645f21d67d3f..cbb7f881424956b51d75bab6d1eee7d188625714 100644 (file)
@@ -5,7 +5,7 @@ LL |     let n = 1 / 2;
    |             ^^^^^
    |
    = note: `-D clippy::integer-division` implied by `-D warnings`
-   = help: division of integers may cause loss of precision. consider using floats.
+   = help: division of integers may cause loss of precision. consider using floats
 
 error: integer division
   --> $DIR/integer_division.rs:6:13
@@ -13,7 +13,7 @@ error: integer division
 LL |     let o = 1 / two;
    |             ^^^^^^^
    |
-   = help: division of integers may cause loss of precision. consider using floats.
+   = help: division of integers may cause loss of precision. consider using floats
 
 error: integer division
   --> $DIR/integer_division.rs:7:13
@@ -21,7 +21,7 @@ error: integer division
 LL |     let p = two / 4;
    |             ^^^^^^^
    |
-   = help: division of integers may cause loss of precision. consider using floats.
+   = help: division of integers may cause loss of precision. consider using floats
 
 error: aborting due to 3 previous errors
 
index 33aba630a5304e22de80e7badd67c1b460c32653..4643e09e2702835ac9803b6050b49f1ba7267171 100644 (file)
@@ -8,7 +8,7 @@ LL | |     }
    |
    = note: `-D clippy::new-ret-no-self` implied by `-D warnings`
 
-error: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead.
+error: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead
   --> $DIR/methods.rs:126:13
    |
 LL |       let _ = v.iter().filter(|&x| {
index 70e7c3dea545bbeff7c3f78e4555fd0f2aee8822..852f48e32d678aa91a2fd32a591fa917212747d3 100644 (file)
@@ -1,4 +1,4 @@
-error: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead.
+error: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead
   --> $DIR/methods_fixable.rs:10:13
    |
 LL |     let _ = v.iter().filter(|&x| *x < 0).next();
index fe9aeedb59c45b80b8b7d3b609e0841363fd98b2..ea39f5b5577beb12803a059f1b3c9322098e55c6 100644 (file)
@@ -7,7 +7,7 @@ LL | #[cfg(linux)]
    |       help: try: `target_os = "linux"`
    |
    = note: `-D clippy::mismatched-target-os` implied by `-D warnings`
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:9:1
@@ -17,7 +17,7 @@ LL | #[cfg(freebsd)]
    |       |
    |       help: try: `target_os = "freebsd"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:12:1
@@ -27,7 +27,7 @@ LL | #[cfg(dragonfly)]
    |       |
    |       help: try: `target_os = "dragonfly"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:15:1
@@ -37,7 +37,7 @@ LL | #[cfg(openbsd)]
    |       |
    |       help: try: `target_os = "openbsd"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:18:1
@@ -47,7 +47,7 @@ LL | #[cfg(netbsd)]
    |       |
    |       help: try: `target_os = "netbsd"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:21:1
@@ -57,7 +57,7 @@ LL | #[cfg(macos)]
    |       |
    |       help: try: `target_os = "macos"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:24:1
@@ -67,7 +67,7 @@ LL | #[cfg(ios)]
    |       |
    |       help: try: `target_os = "ios"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:27:1
@@ -77,7 +77,7 @@ LL | #[cfg(android)]
    |       |
    |       help: try: `target_os = "android"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:30:1
@@ -87,7 +87,7 @@ LL | #[cfg(emscripten)]
    |       |
    |       help: try: `target_os = "emscripten"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:33:1
@@ -97,7 +97,7 @@ LL | #[cfg(fuchsia)]
    |       |
    |       help: try: `target_os = "fuchsia"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:36:1
@@ -107,7 +107,7 @@ LL | #[cfg(haiku)]
    |       |
    |       help: try: `target_os = "haiku"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:39:1
@@ -117,7 +117,7 @@ LL | #[cfg(illumos)]
    |       |
    |       help: try: `target_os = "illumos"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:42:1
@@ -127,7 +127,7 @@ LL | #[cfg(l4re)]
    |       |
    |       help: try: `target_os = "l4re"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:45:1
@@ -137,7 +137,7 @@ LL | #[cfg(redox)]
    |       |
    |       help: try: `target_os = "redox"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:48:1
@@ -147,7 +147,7 @@ LL | #[cfg(solaris)]
    |       |
    |       help: try: `target_os = "solaris"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:51:1
@@ -157,7 +157,7 @@ LL | #[cfg(vxworks)]
    |       |
    |       help: try: `target_os = "vxworks"`
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 
 error: operating system used in target family position
   --> $DIR/mismatched_target_os_unix.rs:55:1
@@ -165,7 +165,7 @@ error: operating system used in target family position
 LL | #[cfg(all(not(any(solaris, linux)), freebsd))]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = help: Did you mean `unix`?
+   = help: did you mean `unix`?
 help: try
    |
 LL | #[cfg(all(not(any(target_os = "solaris", linux)), freebsd))]
index fb807da5f8abee5b3339dcfffe92eb6e16532264..76e789d90525495e6200688688b566237c98586a 100644 (file)
@@ -6,7 +6,7 @@ LL | |     indirect_iter.into_iter().map(|x| (x, x + 1)).collect::<HashMap<_, _>
    | |____^
    |
    = note: `-D clippy::needless-collect` implied by `-D warnings`
-help: Use the original Iterator instead of collecting it and then producing a new one
+help: use the original Iterator instead of collecting it and then producing a new one
    |
 LL |     
 LL |     sample.iter().map(|x| (x, x + 1)).collect::<HashMap<_, _>>();
@@ -19,7 +19,7 @@ LL | /     let indirect_len = sample.iter().collect::<VecDeque<_>>();
 LL | |     indirect_len.len();
    | |____^
    |
-help: Take the original Iterator's count instead of collecting it and finding the length
+help: take the original Iterator's count instead of collecting it and finding the length
    |
 LL |     
 LL |     sample.iter().count();
@@ -32,7 +32,7 @@ LL | /     let indirect_empty = sample.iter().collect::<VecDeque<_>>();
 LL | |     indirect_empty.is_empty();
    | |____^
    |
-help: Check if the original Iterator has anything instead of collecting it and seeing if it's empty
+help: check if the original Iterator has anything instead of collecting it and seeing if it's empty
    |
 LL |     
 LL |     sample.iter().next().is_none();
@@ -45,7 +45,7 @@ LL | /     let indirect_contains = sample.iter().collect::<VecDeque<_>>();
 LL | |     indirect_contains.contains(&&5);
    | |____^
    |
-help: Check if the original Iterator contains an element instead of collecting then checking
+help: check if the original Iterator contains an element instead of collecting then checking
    |
 LL |     
 LL |     sample.iter().any(|x| x == &5);
@@ -58,7 +58,7 @@ LL | /     let non_copy_contains = sample.into_iter().collect::<Vec<_>>();
 LL | |     non_copy_contains.contains(&a);
    | |____^
    |
-help: Check if the original Iterator contains an element instead of collecting then checking
+help: check if the original Iterator contains an element instead of collecting then checking
    |
 LL |     
 LL |     sample.into_iter().any(|x| x == a);
index 567bc518a3fda1003c5a6ee35dbf0596e9ffa93a..983c56031d8f5301879a48ce16497a35ce065c5d 100644 (file)
@@ -1,4 +1,4 @@
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:23:12
    |
 LL |     return Some(to.magic?);
@@ -6,79 +6,79 @@ LL |     return Some(to.magic?);
    |
    = note: `-D clippy::needless-question-mark` implied by `-D warnings`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:31:12
    |
 LL |     return Some(to.magic?)
    |            ^^^^^^^^^^^^^^^ help: try: `to.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:36:5
    |
 LL |     Some(to.magic?)
    |     ^^^^^^^^^^^^^^^ help: try: `to.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:41:21
    |
 LL |     to.and_then(|t| Some(t.magic?))
    |                     ^^^^^^^^^^^^^^ help: try: `t.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:50:9
    |
 LL |         Some(t.magic?)
    |         ^^^^^^^^^^^^^^ help: try: `t.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:55:12
    |
 LL |     return Ok(tr.magic?);
    |            ^^^^^^^^^^^^^ help: try: `tr.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:62:12
    |
 LL |     return Ok(tr.magic?)
    |            ^^^^^^^^^^^^^ help: try: `tr.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:66:5
    |
 LL |     Ok(tr.magic?)
    |     ^^^^^^^^^^^^^ help: try: `tr.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:70:21
    |
 LL |     tr.and_then(|t| Ok(t.magic?))
    |                     ^^^^^^^^^^^^ help: try: `t.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:78:9
    |
 LL |         Ok(t.magic?)
    |         ^^^^^^^^^^^^ help: try: `t.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:85:16
    |
 LL |         return Ok(t.magic?);
    |                ^^^^^^^^^^^^ help: try: `t.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:138:9
    |
 LL |         Ok(to.magic?) // should be triggered
    |         ^^^^^^^^^^^^^ help: try: `to.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:154:9
    |
 LL |         Some(to.magic?) // should be triggered
    |         ^^^^^^^^^^^^^^^ help: try: `to.magic`
 
-error: Question mark operator is useless here
+error: question mark operator is useless here
   --> $DIR/needless_question_mark.rs:162:9
    |
 LL |         Ok(to.magic?) // should be triggered
index c50c4931fb4cc8b68a438de09803e46e0c2015ec..c898cd64a93925e0b5ef45fc640825bff9ff8f6d 100644 (file)
@@ -1,4 +1,4 @@
-error: the loop variable `i` is only used to index `vec`.
+error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:10:14
    |
 LL |     for i in 0..vec.len() {
@@ -10,7 +10,7 @@ help: consider using an iterator
 LL |     for <item> in &vec {
    |         ^^^^^^    ^^^^
 
-error: the loop variable `i` is only used to index `vec`.
+error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:19:14
    |
 LL |     for i in 0..vec.len() {
@@ -21,7 +21,7 @@ help: consider using an iterator
 LL |     for <item> in &vec {
    |         ^^^^^^    ^^^^
 
-error: the loop variable `j` is only used to index `STATIC`.
+error: the loop variable `j` is only used to index `STATIC`
   --> $DIR/needless_range_loop.rs:24:14
    |
 LL |     for j in 0..4 {
@@ -32,7 +32,7 @@ help: consider using an iterator
 LL |     for <item> in &STATIC {
    |         ^^^^^^    ^^^^^^^
 
-error: the loop variable `j` is only used to index `CONST`.
+error: the loop variable `j` is only used to index `CONST`
   --> $DIR/needless_range_loop.rs:28:14
    |
 LL |     for j in 0..4 {
@@ -54,7 +54,7 @@ help: consider using an iterator
 LL |     for (i, <item>) in vec.iter().enumerate() {
    |         ^^^^^^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^
 
-error: the loop variable `i` is only used to index `vec2`.
+error: the loop variable `i` is only used to index `vec2`
   --> $DIR/needless_range_loop.rs:40:14
    |
 LL |     for i in 0..vec.len() {
@@ -65,7 +65,7 @@ help: consider using an iterator
 LL |     for <item> in vec2.iter().take(vec.len()) {
    |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: the loop variable `i` is only used to index `vec`.
+error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:44:14
    |
 LL |     for i in 5..vec.len() {
@@ -76,7 +76,7 @@ help: consider using an iterator
 LL |     for <item> in vec.iter().skip(5) {
    |         ^^^^^^    ^^^^^^^^^^^^^^^^^^
 
-error: the loop variable `i` is only used to index `vec`.
+error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:48:14
    |
 LL |     for i in 0..MAX_LEN {
@@ -87,7 +87,7 @@ help: consider using an iterator
 LL |     for <item> in vec.iter().take(MAX_LEN) {
    |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: the loop variable `i` is only used to index `vec`.
+error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:52:14
    |
 LL |     for i in 0..=MAX_LEN {
@@ -98,7 +98,7 @@ help: consider using an iterator
 LL |     for <item> in vec.iter().take(MAX_LEN + 1) {
    |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: the loop variable `i` is only used to index `vec`.
+error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:56:14
    |
 LL |     for i in 5..10 {
@@ -109,7 +109,7 @@ help: consider using an iterator
 LL |     for <item> in vec.iter().take(10).skip(5) {
    |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: the loop variable `i` is only used to index `vec`.
+error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop.rs:60:14
    |
 LL |     for i in 5..=10 {
index c54ab5ec9809ac0d26ab7b2cc4ccddd6c645f56b..2e1f0fd0299b4cfb168785cc34b2bc11cfdf4110 100644 (file)
@@ -1,4 +1,4 @@
-error: the loop variable `i` is only used to index `ns`.
+error: the loop variable `i` is only used to index `ns`
   --> $DIR/needless_range_loop2.rs:10:14
    |
 LL |     for i in 3..10 {
@@ -10,7 +10,7 @@ help: consider using an iterator
 LL |     for <item> in ns.iter().take(10).skip(3) {
    |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: the loop variable `i` is only used to index `ms`.
+error: the loop variable `i` is only used to index `ms`
   --> $DIR/needless_range_loop2.rs:31:14
    |
 LL |     for i in 0..ms.len() {
@@ -21,7 +21,7 @@ help: consider using an iterator
 LL |     for <item> in &mut ms {
    |         ^^^^^^    ^^^^^^^
 
-error: the loop variable `i` is only used to index `ms`.
+error: the loop variable `i` is only used to index `ms`
   --> $DIR/needless_range_loop2.rs:37:14
    |
 LL |     for i in 0..ms.len() {
@@ -32,7 +32,7 @@ help: consider using an iterator
 LL |     for <item> in &mut ms {
    |         ^^^^^^    ^^^^^^^
 
-error: the loop variable `i` is only used to index `vec`.
+error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop2.rs:61:14
    |
 LL |     for i in x..x + 4 {
@@ -43,7 +43,7 @@ help: consider using an iterator
 LL |     for <item> in vec.iter_mut().skip(x).take(4) {
    |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: the loop variable `i` is only used to index `vec`.
+error: the loop variable `i` is only used to index `vec`
   --> $DIR/needless_range_loop2.rs:68:14
    |
 LL |     for i in x..=x + 4 {
@@ -54,7 +54,7 @@ help: consider using an iterator
 LL |     for <item> in vec.iter_mut().skip(x).take(4 + 1) {
    |         ^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: the loop variable `i` is only used to index `arr`.
+error: the loop variable `i` is only used to index `arr`
   --> $DIR/needless_range_loop2.rs:74:14
    |
 LL |     for i in 0..3 {
@@ -65,7 +65,7 @@ help: consider using an iterator
 LL |     for <item> in &arr {
    |         ^^^^^^    ^^^^
 
-error: the loop variable `i` is only used to index `arr`.
+error: the loop variable `i` is only used to index `arr`
   --> $DIR/needless_range_loop2.rs:78:14
    |
 LL |     for i in 0..2 {
@@ -76,7 +76,7 @@ help: consider using an iterator
 LL |     for <item> in arr.iter().take(2) {
    |         ^^^^^^    ^^^^^^^^^^^^^^^^^^
 
-error: the loop variable `i` is only used to index `arr`.
+error: the loop variable `i` is only used to index `arr`
   --> $DIR/needless_range_loop2.rs:82:14
    |
 LL |     for i in 1..3 {
index 708318bbe295c410f4dd20370842f9c2ce95e648..d302b16d4b72ac801147a2056717b8f58a699b54 100644 (file)
@@ -1,4 +1,4 @@
-error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices.
+error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices
   --> $DIR/ptr_arg.rs:7:14
    |
 LL | fn do_vec(x: &Vec<i64>) {
@@ -6,25 +6,25 @@ LL | fn do_vec(x: &Vec<i64>) {
    |
    = note: `-D clippy::ptr-arg` implied by `-D warnings`
 
-error: writing `&String` instead of `&str` involves a new object where a slice will do.
+error: writing `&String` instead of `&str` involves a new object where a slice will do
   --> $DIR/ptr_arg.rs:16:14
    |
 LL | fn do_str(x: &String) {
    |              ^^^^^^^ help: change this to: `&str`
 
-error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do.
+error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
   --> $DIR/ptr_arg.rs:25:15
    |
 LL | fn do_path(x: &PathBuf) {
    |               ^^^^^^^^ help: change this to: `&Path`
 
-error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices.
+error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices
   --> $DIR/ptr_arg.rs:38:18
    |
 LL |     fn do_vec(x: &Vec<i64>);
    |                  ^^^^^^^^^ help: change this to: `&[i64]`
 
-error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices.
+error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices
   --> $DIR/ptr_arg.rs:51:14
    |
 LL | fn cloned(x: &Vec<u8>) -> Vec<u8> {
@@ -43,7 +43,7 @@ help: change `x.clone()` to
 LL |     x.to_owned()
    |
 
-error: writing `&String` instead of `&str` involves a new object where a slice will do.
+error: writing `&String` instead of `&str` involves a new object where a slice will do
   --> $DIR/ptr_arg.rs:60:18
    |
 LL | fn str_cloned(x: &String) -> String {
@@ -66,7 +66,7 @@ help: change `x.clone()` to
 LL |     x.to_string()
    |
 
-error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do.
+error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
   --> $DIR/ptr_arg.rs:68:19
    |
 LL | fn path_cloned(x: &PathBuf) -> PathBuf {
@@ -89,7 +89,7 @@ help: change `x.clone()` to
 LL |     x.to_path_buf()
    |
 
-error: writing `&String` instead of `&str` involves a new object where a slice will do.
+error: writing `&String` instead of `&str` involves a new object where a slice will do
   --> $DIR/ptr_arg.rs:76:44
    |
 LL | fn false_positive_capacity(x: &Vec<u8>, y: &String) {
@@ -108,13 +108,13 @@ help: change `y.as_str()` to
 LL |     let c = y;
    |             ^
 
-error: using a reference to `Cow` is not recommended.
+error: using a reference to `Cow` is not recommended
   --> $DIR/ptr_arg.rs:90:25
    |
 LL | fn test_cow_with_ref(c: &Cow<[i32]>) {}
    |                         ^^^^^^^^^^^ help: change this to: `&[i32]`
 
-error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices.
+error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices
   --> $DIR/ptr_arg.rs:143:21
    |
 LL |     fn foo_vec(vec: &Vec<u8>) {
@@ -133,7 +133,7 @@ help: change `vec.clone()` to
 LL |         let _ = vec.to_owned().clone();
    |                 ^^^^^^^^^^^^^^
 
-error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do.
+error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
   --> $DIR/ptr_arg.rs:148:23
    |
 LL |     fn foo_path(path: &PathBuf) {
@@ -152,7 +152,7 @@ help: change `path.clone()` to
 LL |         let _ = path.to_path_buf().clone();
    |                 ^^^^^^^^^^^^^^^^^^
 
-error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do.
+error: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
   --> $DIR/ptr_arg.rs:153:21
    |
 LL |     fn foo_str(str: &PathBuf) {
index ce7108217f18dccd5d81743633318de7124697ae..2da05399575a1d6b86b0c308bed0bf49c82f5356 100644 (file)
@@ -1,4 +1,4 @@
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:14:9
    |
 LL |         self.x == other.y && self.y == other.y && self.z == other.z
@@ -6,157 +6,157 @@ LL |         self.x == other.y && self.y == other.y && self.z == other.z
    |
    = note: `-D clippy::suspicious-operation-groupings` implied by `-D warnings`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:14:9
    |
 LL |         self.x == other.y && self.y == other.y && self.z == other.z
    |         ^^^^^^^^^^^^^^^^^ help: I think you meant: `self.x == other.x`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:27:20
    |
 LL |     s1.a < s2.a && s1.a < s2.b
    |                    ^^^^^^^^^^^ help: I think you meant: `s1.b < s2.b`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:75:33
    |
 LL |     s1.a * s2.a + s1.b * s2.b + s1.c * s2.b + s1.d * s2.d
    |                                 ^^^^^^^^^^^ help: I think you meant: `s1.c * s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:80:19
    |
 LL |     s1.a * s2.a + s1.b * s2.c + s1.c * s2.c
    |                   ^^^^^^^^^^^ help: I think you meant: `s1.b * s2.b`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:80:19
    |
 LL |     s1.a * s2.a + s1.b * s2.c + s1.c * s2.c
    |                   ^^^^^^^^^^^ help: I think you meant: `s1.b * s2.b`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:85:19
    |
 LL |     s1.a * s2.a + s2.b * s2.b + s1.c * s2.c
    |                   ^^^^^^^^^^^ help: I think you meant: `s1.b * s2.b`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:90:19
    |
 LL |     s1.a * s2.a + s1.b * s1.b + s1.c * s2.c
    |                   ^^^^^^^^^^^ help: I think you meant: `s1.b * s2.b`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:95:5
    |
 LL |     s1.a * s1.a + s1.b * s2.b + s1.c * s2.c
    |     ^^^^^^^^^^^ help: I think you meant: `s1.a * s2.a`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:100:33
    |
 LL |     s1.a * s2.a + s1.b * s2.b + s1.c * s1.c
    |                                 ^^^^^^^^^^^ help: I think you meant: `s1.c * s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:113:20
    |
 LL |     (s1.a * s2.a + s1.b * s1.b)
    |                    ^^^^^^^^^^^ help: I think you meant: `s1.b * s2.b`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:118:34
    |
 LL |     (s1.a * s2.a + s1.b * s2.b + s1.c * s2.b + s1.d * s2.d)
    |                                  ^^^^^^^^^^^ help: I think you meant: `s1.c * s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:123:38
    |
 LL |     (s1.a * s2.a) + (s1.b * s2.b) + (s1.c * s2.b) + (s1.d * s2.d)
    |                                      ^^^^^^^^^^^ help: I think you meant: `s1.c * s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:128:39
    |
 LL |     ((s1.a * s2.a) + (s1.b * s2.b) + (s1.c * s2.b) + (s1.d * s2.d))
    |                                       ^^^^^^^^^^^ help: I think you meant: `s1.c * s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:133:42
    |
 LL |     (((s1.a * s2.a) + (s1.b * s2.b)) + ((s1.c * s2.b) + (s1.d * s2.d)))
    |                                          ^^^^^^^^^^^ help: I think you meant: `s1.c * s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:133:42
    |
 LL |     (((s1.a * s2.a) + (s1.b * s2.b)) + ((s1.c * s2.b) + (s1.d * s2.d)))
    |                                          ^^^^^^^^^^^ help: I think you meant: `s1.c * s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:138:40
    |
 LL |     (((s1.a * s2.a) + (s1.b * s2.b) + (s1.c * s2.b)) + (s1.d * s2.d))
    |                                        ^^^^^^^^^^^ help: I think you meant: `s1.c * s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:143:40
    |
 LL |     ((s1.a * s2.a) + ((s1.b * s2.b) + (s1.c * s2.b) + (s1.d * s2.d)))
    |                                        ^^^^^^^^^^^ help: I think you meant: `s1.c * s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:148:20
    |
 LL |     (s1.a * s2.a + s2.b * s2.b) / 2
    |                    ^^^^^^^^^^^ help: I think you meant: `s1.b * s2.b`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:153:35
    |
 LL |     i32::swap_bytes(s1.a * s2.a + s2.b * s2.b)
    |                                   ^^^^^^^^^^^ help: I think you meant: `s1.b * s2.b`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:158:29
    |
 LL |     s1.a > 0 && s1.b > 0 && s1.d == s2.c && s1.d == s2.d
    |                             ^^^^^^^^^^^^ help: I think you meant: `s1.c == s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:163:17
    |
 LL |     s1.a > 0 && s1.d == s2.c && s1.b > 0 && s1.d == s2.d
    |                 ^^^^^^^^^^^^ help: I think you meant: `s1.c == s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:172:77
    |
 LL |     (n1.inner.0).0 == (n2.inner.0).0 && (n1.inner.1).0 == (n2.inner.1).0 && (n1.inner.2).0 == (n2.inner.1).0
    |                                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: I think you meant: `(n1.inner.2).0 == (n2.inner.2).0`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:186:25
    |
 LL |         s1.a <= s2.a && s1.a <= s2.b
    |                         ^^^^^^^^^^^^ help: I think you meant: `s1.b <= s2.b`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:192:23
    |
 LL |     if s1.a < s2.a && s1.a < s2.b {
    |                       ^^^^^^^^^^^ help: I think you meant: `s1.b < s2.b`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:199:48
    |
 LL |     -(-(-s1.a * -s2.a) + (-(-s1.b * -s2.b) + -(-s1.c * -s2.b) + -(-s1.d * -s2.d)))
    |                                                ^^^^^^^^^^^^^ help: I think you meant: `-s1.c * -s2.c`
 
-error: This sequence of operators looks suspiciously like a bug.
+error: this sequence of operators looks suspiciously like a bug
   --> $DIR/suspicious_operation_groupings.rs:204:27
    |
 LL |     -(if -s1.a < -s2.a && -s1.a < -s2.b { s1.c } else { s2.a })
index 6c36141a58c6557ad5db5788556876b512e68340..b8cfd987394976da96c02ed4d70624068bbe68b6 100644 (file)
@@ -1,4 +1,4 @@
-error: `ref` directly on a function argument is ignored. Consider using a reference type instead.
+error: `ref` directly on a function argument is ignored. Consider using a reference type instead
   --> $DIR/toplevel_ref_arg_non_rustfix.rs:9:15
    |
 LL | fn the_answer(ref mut x: u8) {
@@ -6,7 +6,7 @@ LL | fn the_answer(ref mut x: u8) {
    |
    = note: `-D clippy::toplevel-ref-arg` implied by `-D warnings`
 
-error: `ref` directly on a function argument is ignored. Consider using a reference type instead.
+error: `ref` directly on a function argument is ignored. Consider using a reference type instead
   --> $DIR/toplevel_ref_arg_non_rustfix.rs:15:24
    |
 LL |         fn fun_example(ref _x: usize) {}
index 05f91ee2adaa8b37e2ffd769445166e13aa7e112..1848fc2490a00c64a3860145700864745c51d558 100644 (file)
@@ -1,4 +1,4 @@
-error: transmuting a known null pointer into a reference.
+error: transmuting a known null pointer into a reference
   --> $DIR/transmuting_null.rs:10:23
    |
 LL |         let _: &u64 = std::mem::transmute(0 as *const u64);
@@ -6,13 +6,13 @@ LL |         let _: &u64 = std::mem::transmute(0 as *const u64);
    |
    = note: `-D clippy::transmuting-null` implied by `-D warnings`
 
-error: transmuting a known null pointer into a reference.
+error: transmuting a known null pointer into a reference
   --> $DIR/transmuting_null.rs:11:23
    |
 LL |         let _: &u64 = std::mem::transmute(std::ptr::null::<u64>());
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: transmuting a known null pointer into a reference.
+error: transmuting a known null pointer into a reference
   --> $DIR/transmuting_null.rs:21:23
    |
 LL |         let _: &u64 = std::mem::transmute(ZPTR);
index 44dcd0cafbb6e7614579eff586b9f87b83a444ed..cc94bd5cd9e16bcc03ab9b8d765384e19ea3089a 100644 (file)
@@ -2,7 +2,7 @@ error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:35:13
    |
 LL |     let _ = opt.unwrap_or_else(|| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `opt.unwrap_or(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `opt.unwrap_or(2)`
    |
    = note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings`
 
@@ -10,187 +10,187 @@ error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:36:13
    |
 LL |     let _ = opt.unwrap_or_else(|| astronomers_pi);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `opt.unwrap_or(astronomers_pi)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `opt.unwrap_or(astronomers_pi)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:37:13
    |
 LL |     let _ = opt.unwrap_or_else(|| ext_str.some_field);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `opt.unwrap_or(ext_str.some_field)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `opt.unwrap_or(ext_str.some_field)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:39:13
    |
 LL |     let _ = opt.and_then(|_| ext_opt);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `and` instead: `opt.and(ext_opt)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `and` instead: `opt.and(ext_opt)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:40:13
    |
 LL |     let _ = opt.or_else(|| ext_opt);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^ help: Use `or` instead: `opt.or(ext_opt)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^ help: use `or` instead: `opt.or(ext_opt)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:41:13
    |
 LL |     let _ = opt.or_else(|| None);
-   |             ^^^^^^^^^^^^^^^^^^^^ help: Use `or` instead: `opt.or(None)`
+   |             ^^^^^^^^^^^^^^^^^^^^ help: use `or` instead: `opt.or(None)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:42:13
    |
 LL |     let _ = opt.get_or_insert_with(|| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `get_or_insert` instead: `opt.get_or_insert(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `get_or_insert` instead: `opt.get_or_insert(2)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:43:13
    |
 LL |     let _ = opt.ok_or_else(|| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^ help: Use `ok_or` instead: `opt.ok_or(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^ help: use `ok_or` instead: `opt.ok_or(2)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:44:13
    |
 LL |     let _ = nested_tuple_opt.unwrap_or_else(|| Some((1, 2)));
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `nested_tuple_opt.unwrap_or(Some((1, 2)))`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `nested_tuple_opt.unwrap_or(Some((1, 2)))`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:47:13
    |
 LL |     let _ = Some(10).unwrap_or_else(|| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `Some(10).unwrap_or(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `Some(10).unwrap_or(2)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:48:13
    |
 LL |     let _ = Some(10).and_then(|_| ext_opt);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `and` instead: `Some(10).and(ext_opt)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `and` instead: `Some(10).and(ext_opt)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:49:28
    |
 LL |     let _: Option<usize> = None.or_else(|| ext_opt);
-   |                            ^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `or` instead: `None.or(ext_opt)`
+   |                            ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `or` instead: `None.or(ext_opt)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:50:13
    |
 LL |     let _ = None.get_or_insert_with(|| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `get_or_insert` instead: `None.get_or_insert(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `get_or_insert` instead: `None.get_or_insert(2)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:51:35
    |
 LL |     let _: Result<usize, usize> = None.ok_or_else(|| 2);
-   |                                   ^^^^^^^^^^^^^^^^^^^^^ help: Use `ok_or` instead: `None.ok_or(2)`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^ help: use `ok_or` instead: `None.ok_or(2)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:52:28
    |
 LL |     let _: Option<usize> = None.or_else(|| None);
-   |                            ^^^^^^^^^^^^^^^^^^^^^ help: Use `or` instead: `None.or(None)`
+   |                            ^^^^^^^^^^^^^^^^^^^^^ help: use `or` instead: `None.or(None)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:55:13
    |
 LL |     let _ = deep.0.unwrap_or_else(|| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `deep.0.unwrap_or(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `deep.0.unwrap_or(2)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:56:13
    |
 LL |     let _ = deep.0.and_then(|_| ext_opt);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `and` instead: `deep.0.and(ext_opt)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `and` instead: `deep.0.and(ext_opt)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:57:13
    |
 LL |     let _ = deep.0.or_else(|| None);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^ help: Use `or` instead: `deep.0.or(None)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^ help: use `or` instead: `deep.0.or(None)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:58:13
    |
 LL |     let _ = deep.0.get_or_insert_with(|| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `get_or_insert` instead: `deep.0.get_or_insert(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `get_or_insert` instead: `deep.0.get_or_insert(2)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:59:13
    |
 LL |     let _ = deep.0.ok_or_else(|| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^ help: Use `ok_or` instead: `deep.0.ok_or(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^ help: use `ok_or` instead: `deep.0.ok_or(2)`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:79:28
    |
 LL |     let _: Option<usize> = None.or_else(|| Some(3));
-   |                            ^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `or` instead: `None.or(Some(3))`
+   |                            ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `or` instead: `None.or(Some(3))`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:80:13
    |
 LL |     let _ = deep.0.or_else(|| Some(3));
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `or` instead: `deep.0.or(Some(3))`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `or` instead: `deep.0.or(Some(3))`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:81:13
    |
 LL |     let _ = opt.or_else(|| Some(3));
-   |             ^^^^^^^^^^^^^^^^^^^^^^^ help: Use `or` instead: `opt.or(Some(3))`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^ help: use `or` instead: `opt.or(Some(3))`
 
 error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval.rs:87:13
    |
 LL |     let _ = res2.unwrap_or_else(|_| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `res2.unwrap_or(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `res2.unwrap_or(2)`
 
 error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval.rs:88:13
    |
 LL |     let _ = res2.unwrap_or_else(|_| astronomers_pi);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `res2.unwrap_or(astronomers_pi)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `res2.unwrap_or(astronomers_pi)`
 
 error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval.rs:89:13
    |
 LL |     let _ = res2.unwrap_or_else(|_| ext_str.some_field);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `res2.unwrap_or(ext_str.some_field)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `res2.unwrap_or(ext_str.some_field)`
 
 error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval.rs:111:35
    |
 LL |     let _: Result<usize, usize> = res.and_then(|_| Err(2));
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `and` instead: `res.and(Err(2))`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `and` instead: `res.and(Err(2))`
 
 error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval.rs:112:35
    |
 LL |     let _: Result<usize, usize> = res.and_then(|_| Err(astronomers_pi));
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `and` instead: `res.and(Err(astronomers_pi))`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `and` instead: `res.and(Err(astronomers_pi))`
 
 error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval.rs:113:35
    |
 LL |     let _: Result<usize, usize> = res.and_then(|_| Err(ext_str.some_field));
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `and` instead: `res.and(Err(ext_str.some_field))`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `and` instead: `res.and(Err(ext_str.some_field))`
 
 error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval.rs:115:35
    |
 LL |     let _: Result<usize, usize> = res.or_else(|_| Ok(2));
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: Use `or` instead: `res.or(Ok(2))`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: use `or` instead: `res.or(Ok(2))`
 
 error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval.rs:116:35
    |
 LL |     let _: Result<usize, usize> = res.or_else(|_| Ok(astronomers_pi));
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `or` instead: `res.or(Ok(astronomers_pi))`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `or` instead: `res.or(Ok(astronomers_pi))`
 
 error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval.rs:117:35
    |
 LL |     let _: Result<usize, usize> = res.or_else(|_| Ok(ext_str.some_field));
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `or` instead: `res.or(Ok(ext_str.some_field))`
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `or` instead: `res.or(Ok(ext_str.some_field))`
 
 error: aborting due to 32 previous errors
 
index 581d641cbf54bae9401667832921742285982ff7..75674b0a9d20ae128c8f26f427ef381364d8b779 100644 (file)
@@ -2,7 +2,7 @@ error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval_unfixable.rs:12:13
    |
 LL |     let _ = Ok(1).unwrap_or_else(|()| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `Ok(1).unwrap_or(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `Ok(1).unwrap_or(2)`
    |
    = note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings`
 
@@ -10,13 +10,13 @@ error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval_unfixable.rs:16:13
    |
 LL |     let _ = Ok(1).unwrap_or_else(|e::E| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `Ok(1).unwrap_or(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `Ok(1).unwrap_or(2)`
 
 error: unnecessary closure used to substitute value for `Result::Err`
   --> $DIR/unnecessary_lazy_eval_unfixable.rs:17:13
    |
 LL |     let _ = Ok(1).unwrap_or_else(|SomeStruct { .. }| 2);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `Ok(1).unwrap_or(2)`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `Ok(1).unwrap_or(2)`
 
 error: aborting due to 3 previous errors
 
index 68e96148093d2ad1bd58bf082d9574e340aa97b7..2cbfc5ca2e2705e0bb618bfad420339277493f22 100644 (file)
@@ -1,4 +1,4 @@
-error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
+error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
   --> $DIR/used_underscore_binding.rs:26:5
    |
 LL |     _foo + 1
@@ -6,31 +6,31 @@ LL |     _foo + 1
    |
    = note: `-D clippy::used-underscore-binding` implied by `-D warnings`
 
-error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
+error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
   --> $DIR/used_underscore_binding.rs:31:20
    |
 LL |     println!("{}", _foo);
    |                    ^^^^
 
-error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
+error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
   --> $DIR/used_underscore_binding.rs:32:16
    |
 LL |     assert_eq!(_foo, _foo);
    |                ^^^^
 
-error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
+error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
   --> $DIR/used_underscore_binding.rs:32:22
    |
 LL |     assert_eq!(_foo, _foo);
    |                      ^^^^
 
-error: used binding `_underscore_field` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
+error: used binding `_underscore_field` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
   --> $DIR/used_underscore_binding.rs:45:5
    |
 LL |     s._underscore_field += 1;
    |     ^^^^^^^^^^^^^^^^^^^
 
-error: used binding `_i` which is prefixed with an underscore. A leading underscore signals that a binding will not be used.
+error: used binding `_i` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
   --> $DIR/used_underscore_binding.rs:100:16
    |
 LL |         uses_i(_i);
index 57e2f1fdf9a7449407850a5a25f48d01b97de3f8..83435a40aa16fc7bf972192cea76eebd9c39abc1 100644 (file)
@@ -1,4 +1,4 @@
-error: `Vec<T>` is already on the heap, the boxing is unnecessary.
+error: `Vec<T>` is already on the heap, the boxing is unnecessary
   --> $DIR/vec_box_sized.rs:14:21
    |
 LL |         sized_type: Vec<Box<SizedStruct>>,
@@ -6,19 +6,19 @@ LL |         sized_type: Vec<Box<SizedStruct>>,
    |
    = note: `-D clippy::vec-box` implied by `-D warnings`
 
-error: `Vec<T>` is already on the heap, the boxing is unnecessary.
+error: `Vec<T>` is already on the heap, the boxing is unnecessary
   --> $DIR/vec_box_sized.rs:17:14
    |
 LL |     struct A(Vec<Box<SizedStruct>>);
    |              ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`
 
-error: `Vec<T>` is already on the heap, the boxing is unnecessary.
+error: `Vec<T>` is already on the heap, the boxing is unnecessary
   --> $DIR/vec_box_sized.rs:18:18
    |
 LL |     struct B(Vec<Vec<Box<(u32)>>>);
    |                  ^^^^^^^^^^^^^^^ help: try: `Vec<u32>`
 
-error: `Vec<T>` is already on the heap, the boxing is unnecessary.
+error: `Vec<T>` is already on the heap, the boxing is unnecessary
   --> $DIR/vec_box_sized.rs:46:23
    |
 LL |         pub fn f() -> Vec<Box<S>> {
index 33c34cbbd4088bb23fb9b218fae9cb58b199d78c..45b87aa0f20b9e7f4d90e88d4dfd87b64ee3747e 100644 (file)
@@ -1,35 +1,35 @@
-error: wildcard pattern covers any other pattern as it will match anyway.
+error: wildcard pattern covers any other pattern as it will match anyway
   --> $DIR/wild_in_or_pats.rs:8:9
    |
 LL |         "bar" | _ => {
    |         ^^^^^^^^^
    |
    = note: `-D clippy::wildcard-in-or-patterns` implied by `-D warnings`
-   = help: Consider handling `_` separately.
+   = help: consider handling `_` separately
 
-error: wildcard pattern covers any other pattern as it will match anyway.
+error: wildcard pattern covers any other pattern as it will match anyway
   --> $DIR/wild_in_or_pats.rs:16:9
    |
 LL |         "bar" | "bar2" | _ => {
    |         ^^^^^^^^^^^^^^^^^^
    |
-   = help: Consider handling `_` separately.
+   = help: consider handling `_` separately
 
-error: wildcard pattern covers any other pattern as it will match anyway.
+error: wildcard pattern covers any other pattern as it will match anyway
   --> $DIR/wild_in_or_pats.rs:24:9
    |
 LL |         _ | "bar" | _ => {
    |         ^^^^^^^^^^^^^
    |
-   = help: Consider handling `_` separately.
+   = help: consider handling `_` separately
 
-error: wildcard pattern covers any other pattern as it will match anyway.
+error: wildcard pattern covers any other pattern as it will match anyway
   --> $DIR/wild_in_or_pats.rs:32:9
    |
 LL |         _ | "bar" => {
    |         ^^^^^^^^^
    |
-   = help: Consider handling `_` separately.
+   = help: consider handling `_` separately
 
 error: aborting due to 4 previous errors
 
index d0e88f3c5a546612a4cb5843fc41c0f2bce24410..0931dd32e7af2e5a5568def4a1c6ac039ff76170 100644 (file)
@@ -13,7 +13,7 @@ LL |     let nan = 0.0 / 0.0;
    |               ^^^^^^^^^
    |
    = note: `-D clippy::zero-divided-by-zero` implied by `-D warnings`
-   = help: Consider using `f64::NAN` if you would like a constant representing NaN
+   = help: consider using `f64::NAN` if you would like a constant representing NaN
 
 error: equal expressions as operands to `/`
   --> $DIR/zero_div_zero.rs:5:19
@@ -27,7 +27,7 @@ error: constant division of `0.0` with `0.0` will always result in NaN
 LL |     let f64_nan = 0.0 / 0.0f64;
    |                   ^^^^^^^^^^^^
    |
-   = help: Consider using `f64::NAN` if you would like a constant representing NaN
+   = help: consider using `f64::NAN` if you would like a constant representing NaN
 
 error: equal expressions as operands to `/`
   --> $DIR/zero_div_zero.rs:6:25
@@ -41,7 +41,7 @@ error: constant division of `0.0` with `0.0` will always result in NaN
 LL |     let other_f64_nan = 0.0f64 / 0.0;
    |                         ^^^^^^^^^^^^
    |
-   = help: Consider using `f64::NAN` if you would like a constant representing NaN
+   = help: consider using `f64::NAN` if you would like a constant representing NaN
 
 error: equal expressions as operands to `/`
   --> $DIR/zero_div_zero.rs:7:28
@@ -55,7 +55,7 @@ error: constant division of `0.0` with `0.0` will always result in NaN
 LL |     let one_more_f64_nan = 0.0f64 / 0.0f64;
    |                            ^^^^^^^^^^^^^^^
    |
-   = help: Consider using `f64::NAN` if you would like a constant representing NaN
+   = help: consider using `f64::NAN` if you would like a constant representing NaN
 
 error: aborting due to 8 previous errors