diff --git a/tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.stderr b/tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.stderr index 62c45b54634f..4c75998437fd 100644 --- a/tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.stderr +++ b/tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.stderr @@ -4,8 +4,8 @@ error: `std::string::String` may not be held across an `await` point per `clippy LL | let _x = String::from("hello"); | ^^ | - = note: `-D clippy::await-holding-invalid-type` implied by `-D warnings` = note: strings are bad + = note: `-D clippy::await-holding-invalid-type` implied by `-D warnings` error: `std::net::Ipv4Addr` may not be held across an `await` point per `clippy.toml` --> $DIR/await_holding_invalid_type.rs:10:9 diff --git a/tests/ui-toml/conf_deprecated_key/conf_deprecated_key.stderr b/tests/ui-toml/conf_deprecated_key/conf_deprecated_key.stderr index 4c560299ebdd..b2b57bdde89c 100644 --- a/tests/ui-toml/conf_deprecated_key/conf_deprecated_key.stderr +++ b/tests/ui-toml/conf_deprecated_key/conf_deprecated_key.stderr @@ -8,8 +8,8 @@ error: the function has a cognitive complexity of (3/2) LL | fn cognitive_complexity() { | ^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::cognitive-complexity` implied by `-D warnings` = help: you could split it up into multiple smaller functions + = note: `-D clippy::cognitive-complexity` implied by `-D warnings` error: aborting due to previous error; 2 warnings emitted diff --git a/tests/ui-toml/expect_used/expect_used.stderr b/tests/ui-toml/expect_used/expect_used.stderr index c5d95cb8a147..28a08599c67c 100644 --- a/tests/ui-toml/expect_used/expect_used.stderr +++ b/tests/ui-toml/expect_used/expect_used.stderr @@ -4,8 +4,8 @@ error: used `expect()` on `an Option` value LL | let _ = opt.expect(""); | ^^^^^^^^^^^^^^ | - = note: `-D clippy::expect-used` implied by `-D warnings` = help: if this value is `None`, it will panic + = note: `-D clippy::expect-used` implied by `-D warnings` error: used `expect()` on `a Result` value --> $DIR/expect_used.rs:11:13 diff --git a/tests/ui-toml/fn_params_excessive_bools/test.stderr b/tests/ui-toml/fn_params_excessive_bools/test.stderr index d05adc3d36e3..87bdb61c6a5e 100644 --- a/tests/ui-toml/fn_params_excessive_bools/test.stderr +++ b/tests/ui-toml/fn_params_excessive_bools/test.stderr @@ -4,8 +4,8 @@ error: more than 1 bools in function parameters LL | fn g(_: bool, _: bool) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::fn-params-excessive-bools` implied by `-D warnings` = help: consider refactoring bools into two-variant enums + = note: `-D clippy::fn-params-excessive-bools` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui-toml/large_include_file/large_include_file.stderr b/tests/ui-toml/large_include_file/large_include_file.stderr index 6a685a58318b..7b5fb9e87659 100644 --- a/tests/ui-toml/large_include_file/large_include_file.stderr +++ b/tests/ui-toml/large_include_file/large_include_file.stderr @@ -4,8 +4,8 @@ error: attempted to include a large file LL | const TOO_BIG_INCLUDE_BYTES: &[u8; 654] = include_bytes!("too_big.txt"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::large-include-file` implied by `-D warnings` = note: the configuration allows a maximum size of 600 bytes + = note: `-D clippy::large-include-file` implied by `-D warnings` = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info) error: attempted to include a large file diff --git a/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.stderr b/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.stderr index d80ad49f3086..15fa4f42f9ba 100644 --- a/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.stderr +++ b/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.stderr @@ -4,12 +4,12 @@ error: use of irregular braces for `vec!` macro LL | let _ = vec! {1, 2, 3}; | ^^^^^^^^^^^^^^ | - = note: `-D clippy::nonstandard-macro-braces` implied by `-D warnings` help: consider writing `vec![1, 2, 3]` --> $DIR/conf_nonstandard_macro_braces.rs:43:13 | LL | let _ = vec! {1, 2, 3}; | ^^^^^^^^^^^^^^ + = note: `-D clippy::nonstandard-macro-braces` implied by `-D warnings` error: use of irregular braces for `format!` macro --> $DIR/conf_nonstandard_macro_braces.rs:44:13 diff --git a/tests/ui-toml/strict_non_send_fields_in_send_ty/test.stderr b/tests/ui-toml/strict_non_send_fields_in_send_ty/test.stderr index 49eecf18b4c4..c72f8c6488db 100644 --- a/tests/ui-toml/strict_non_send_fields_in_send_ty/test.stderr +++ b/tests/ui-toml/strict_non_send_fields_in_send_ty/test.stderr @@ -4,13 +4,13 @@ error: some fields in `NoGeneric` are not safe to be sent to another thread LL | unsafe impl Send for NoGeneric {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings` note: it is not safe to send field `rc_is_not_send` to another thread --> $DIR/test.rs:8:5 | LL | rc_is_not_send: Rc, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: use a thread-safe type that implements `Send` + = note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings` error: some fields in `MultiField` are not safe to be sent to another thread --> $DIR/test.rs:19:1 diff --git a/tests/ui-toml/struct_excessive_bools/test.stderr b/tests/ui-toml/struct_excessive_bools/test.stderr index 65861d10d0fd..4e7c70d18385 100644 --- a/tests/ui-toml/struct_excessive_bools/test.stderr +++ b/tests/ui-toml/struct_excessive_bools/test.stderr @@ -6,8 +6,8 @@ LL | | a: bool, LL | | } | |_^ | - = note: `-D clippy::struct-excessive-bools` implied by `-D warnings` = help: consider using a state machine or refactoring bools into two-variant enums + = note: `-D clippy::struct-excessive-bools` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui-toml/unwrap_used/unwrap_used.stderr b/tests/ui-toml/unwrap_used/unwrap_used.stderr index 6bcfa0a8b564..681b5eaf54db 100644 --- a/tests/ui-toml/unwrap_used/unwrap_used.stderr +++ b/tests/ui-toml/unwrap_used/unwrap_used.stderr @@ -16,8 +16,8 @@ error: used `unwrap()` on `an Option` value LL | let _ = boxed_slice.get(1).unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::unwrap-used` implied by `-D warnings` = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message + = note: `-D clippy::unwrap-used` implied by `-D warnings` error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise --> $DIR/unwrap_used.rs:36:17 diff --git a/tests/ui/absurd-extreme-comparisons.stderr b/tests/ui/absurd-extreme-comparisons.stderr index 6de554378aaa..21cb11fa1bb8 100644 --- a/tests/ui/absurd-extreme-comparisons.stderr +++ b/tests/ui/absurd-extreme-comparisons.stderr @@ -4,8 +4,8 @@ error: this comparison involving the minimum or maximum element for this type co LL | u <= 0; | ^^^^^^ | - = note: `-D clippy::absurd-extreme-comparisons` implied by `-D warnings` = help: because `0` is the minimum value for this type, the case where the two sides are not equal never occurs, consider using `u == 0` instead + = note: `-D clippy::absurd-extreme-comparisons` implied by `-D warnings` error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false --> $DIR/absurd-extreme-comparisons.rs:15:5 diff --git a/tests/ui/allow_attributes_without_reason.stderr b/tests/ui/allow_attributes_without_reason.stderr index cd040a144aac..23f17e9a7afb 100644 --- a/tests/ui/allow_attributes_without_reason.stderr +++ b/tests/ui/allow_attributes_without_reason.stderr @@ -4,12 +4,12 @@ error: `allow` attribute without specifying a reason LL | #[allow(dead_code)] | ^^^^^^^^^^^^^^^^^^^ | + = help: try adding a reason at the end with `, reason = ".."` note: the lint level is defined here --> $DIR/allow_attributes_without_reason.rs:2:9 | LL | #![deny(clippy::allow_attributes_without_reason)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: try adding a reason at the end with `, reason = ".."` error: `allow` attribute without specifying a reason --> $DIR/allow_attributes_without_reason.rs:6:1 diff --git a/tests/ui/approx_const.stderr b/tests/ui/approx_const.stderr index 4da1b8215ae0..0932a2eec520 100644 --- a/tests/ui/approx_const.stderr +++ b/tests/ui/approx_const.stderr @@ -4,8 +4,8 @@ error: approximate value of `f{32, 64}::consts::E` found LL | let my_e = 2.7182; | ^^^^^^ | - = note: `-D clippy::approx-constant` implied by `-D warnings` = help: consider using the constant directly + = note: `-D clippy::approx-constant` implied by `-D warnings` error: approximate value of `f{32, 64}::consts::E` found --> $DIR/approx_const.rs:5:20 diff --git a/tests/ui/as_conversions.stderr b/tests/ui/as_conversions.stderr index d11b56171b07..f5d59e1e5d83 100644 --- a/tests/ui/as_conversions.stderr +++ b/tests/ui/as_conversions.stderr @@ -4,8 +4,8 @@ error: using a potentially dangerous silent `as` conversion LL | let i = 0u32 as u64; | ^^^^^^^^^^^ | - = note: `-D clippy::as-conversions` implied by `-D warnings` = help: consider using a safe wrapper for this conversion + = note: `-D clippy::as-conversions` implied by `-D warnings` error: using a potentially dangerous silent `as` conversion --> $DIR/as_conversions.rs:17:13 diff --git a/tests/ui/asm_syntax.stderr b/tests/ui/asm_syntax.stderr index e9b150121aa3..9c7c3ba7d87e 100644 --- a/tests/ui/asm_syntax.stderr +++ b/tests/ui/asm_syntax.stderr @@ -4,8 +4,8 @@ error: Intel x86 assembly syntax used LL | asm!(""); | ^^^^^^^^ | - = note: `-D clippy::inline-asm-x86-intel-syntax` implied by `-D warnings` = help: use AT&T x86 assembly syntax + = note: `-D clippy::inline-asm-x86-intel-syntax` implied by `-D warnings` error: Intel x86 assembly syntax used --> $DIR/asm_syntax.rs:9:9 @@ -29,8 +29,8 @@ error: AT&T x86 assembly syntax used LL | asm!("", options(att_syntax)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::inline-asm-x86-att-syntax` implied by `-D warnings` = help: use Intel x86 assembly syntax + = note: `-D clippy::inline-asm-x86-att-syntax` implied by `-D warnings` error: AT&T x86 assembly syntax used --> $DIR/asm_syntax.rs:24:9 diff --git a/tests/ui/assertions_on_constants.stderr b/tests/ui/assertions_on_constants.stderr index e1f818814d50..29fe009035f1 100644 --- a/tests/ui/assertions_on_constants.stderr +++ b/tests/ui/assertions_on_constants.stderr @@ -4,8 +4,8 @@ error: `assert!(true)` will be optimized out by the compiler LL | assert!(true); | ^^^^^^^^^^^^^ | - = note: `-D clippy::assertions-on-constants` implied by `-D warnings` = help: remove it + = note: `-D clippy::assertions-on-constants` implied by `-D warnings` error: `assert!(false)` should probably be replaced --> $DIR/assertions_on_constants.rs:11:5 diff --git a/tests/ui/await_holding_lock.stderr b/tests/ui/await_holding_lock.stderr index 976da8d92424..81a2d0524383 100644 --- a/tests/ui/await_holding_lock.stderr +++ b/tests/ui/await_holding_lock.stderr @@ -4,7 +4,6 @@ error: this `MutexGuard` is held across an `await` point LL | let guard = x.lock().unwrap(); | ^^^^^ | - = note: `-D clippy::await-holding-lock` implied by `-D warnings` = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await note: these are all the `await` points this lock is held through --> $DIR/await_holding_lock.rs:9:9 @@ -13,6 +12,7 @@ LL | / let guard = x.lock().unwrap(); LL | | baz().await LL | | } | |_____^ + = note: `-D clippy::await-holding-lock` implied by `-D warnings` error: this `MutexGuard` is held across an `await` point --> $DIR/await_holding_lock.rs:24:13 diff --git a/tests/ui/await_holding_refcell_ref.stderr b/tests/ui/await_holding_refcell_ref.stderr index 4339fca735dd..25c15ab80602 100644 --- a/tests/ui/await_holding_refcell_ref.stderr +++ b/tests/ui/await_holding_refcell_ref.stderr @@ -4,7 +4,6 @@ error: this `RefCell` reference is held across an `await` point LL | let b = x.borrow(); | ^ | - = note: `-D clippy::await-holding-refcell-ref` implied by `-D warnings` = help: ensure the reference is dropped before calling `await` note: these are all the `await` points this reference is held through --> $DIR/await_holding_refcell_ref.rs:6:5 @@ -13,6 +12,7 @@ LL | / let b = x.borrow(); LL | | baz().await LL | | } | |_^ + = note: `-D clippy::await-holding-refcell-ref` implied by `-D warnings` error: this `RefCell` reference is held across an `await` point --> $DIR/await_holding_refcell_ref.rs:11:9 diff --git a/tests/ui/blanket_clippy_restriction_lints.stderr b/tests/ui/blanket_clippy_restriction_lints.stderr index 537557f8b0af..e83eb4d605aa 100644 --- a/tests/ui/blanket_clippy_restriction_lints.stderr +++ b/tests/ui/blanket_clippy_restriction_lints.stderr @@ -4,8 +4,8 @@ error: restriction lints are not meant to be all enabled LL | #![warn(clippy::restriction)] | ^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::blanket-clippy-restriction-lints` implied by `-D warnings` = help: try enabling only the lints you really need + = note: `-D clippy::blanket-clippy-restriction-lints` implied by `-D warnings` error: restriction lints are not meant to be all enabled --> $DIR/blanket_clippy_restriction_lints.rs:5:9 diff --git a/tests/ui/bool_to_int_with_if.stderr b/tests/ui/bool_to_int_with_if.stderr index e695440f6682..4cb5531bef6a 100644 --- a/tests/ui/bool_to_int_with_if.stderr +++ b/tests/ui/bool_to_int_with_if.stderr @@ -8,8 +8,8 @@ LL | | 0 LL | | }; | |_____^ help: replace with from: `i32::from(a)` | - = note: `-D clippy::bool-to-int-with-if` implied by `-D warnings` = note: `a as i32` or `a.into()` can also be valid options + = note: `-D clippy::bool-to-int-with-if` implied by `-D warnings` error: boolean to int conversion using if --> $DIR/bool_to_int_with_if.rs:20:5 diff --git a/tests/ui/borrow_interior_mutable_const/enums.stderr b/tests/ui/borrow_interior_mutable_const/enums.stderr index 654a1ee7df65..b0cab977a038 100644 --- a/tests/ui/borrow_interior_mutable_const/enums.stderr +++ b/tests/ui/borrow_interior_mutable_const/enums.stderr @@ -4,8 +4,8 @@ error: a `const` item with interior mutability should not be borrowed LL | let _ = &UNFROZEN_VARIANT; //~ ERROR interior mutability | ^^^^^^^^^^^^^^^^ | - = note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings` = help: assign this const to a local or static variable, and use the variable here + = note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings` error: a `const` item with interior mutability should not be borrowed --> $DIR/enums.rs:37:18 diff --git a/tests/ui/borrow_interior_mutable_const/others.stderr b/tests/ui/borrow_interior_mutable_const/others.stderr index 9a908cf30e94..c87ad206c2ae 100644 --- a/tests/ui/borrow_interior_mutable_const/others.stderr +++ b/tests/ui/borrow_interior_mutable_const/others.stderr @@ -4,8 +4,8 @@ error: a `const` item with interior mutability should not be borrowed LL | ATOMIC.store(1, Ordering::SeqCst); //~ ERROR interior mutability | ^^^^^^ | - = note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings` = help: assign this const to a local or static variable, and use the variable here + = note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings` error: a `const` item with interior mutability should not be borrowed --> $DIR/others.rs:55:16 diff --git a/tests/ui/borrow_interior_mutable_const/traits.stderr b/tests/ui/borrow_interior_mutable_const/traits.stderr index 8f26403abd3e..f34ae8814c33 100644 --- a/tests/ui/borrow_interior_mutable_const/traits.stderr +++ b/tests/ui/borrow_interior_mutable_const/traits.stderr @@ -4,8 +4,8 @@ error: a `const` item with interior mutability should not be borrowed LL | let _ = &Self::ATOMIC; //~ ERROR interior mutable | ^^^^^^^^^^^^ | - = note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings` = help: assign this const to a local or static variable, and use the variable here + = note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings` error: a `const` item with interior mutability should not be borrowed --> $DIR/traits.rs:26:18 diff --git a/tests/ui/box_collection.stderr b/tests/ui/box_collection.stderr index 2b28598ded92..40b6f9be61d5 100644 --- a/tests/ui/box_collection.stderr +++ b/tests/ui/box_collection.stderr @@ -4,8 +4,8 @@ error: you seem to be trying to use `Box>`. Consider using just `Vec<..> LL | fn test1(foo: Box>) {} | ^^^^^^^^^^^^^^ | - = note: `-D clippy::box-collection` implied by `-D warnings` = help: `Vec<..>` is already on the heap, `Box>` makes an extra allocation + = note: `-D clippy::box-collection` implied by `-D warnings` error: you seem to be trying to use `Box`. Consider using just `String` --> $DIR/box_collection.rs:28:15 diff --git a/tests/ui/branches_sharing_code/shared_at_bottom.stderr b/tests/ui/branches_sharing_code/shared_at_bottom.stderr index 5e1a68d216ea..b919812e098a 100644 --- a/tests/ui/branches_sharing_code/shared_at_bottom.stderr +++ b/tests/ui/branches_sharing_code/shared_at_bottom.stderr @@ -7,12 +7,12 @@ LL | | result LL | | }; | |_____^ | + = note: the end suggestion probably needs some adjustments to use the expression result correctly note: the lint level is defined here --> $DIR/shared_at_bottom.rs:2:36 | LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: the end suggestion probably needs some adjustments to use the expression result correctly help: consider moving these statements after the if | LL ~ } diff --git a/tests/ui/branches_sharing_code/shared_at_top.stderr b/tests/ui/branches_sharing_code/shared_at_top.stderr index d890b12ecbb4..fb3da641fb5e 100644 --- a/tests/ui/branches_sharing_code/shared_at_top.stderr +++ b/tests/ui/branches_sharing_code/shared_at_top.stderr @@ -103,11 +103,6 @@ LL | | println!("This should trigger `IS_SAME_THAN_ELSE` as usual"); LL | | } else { | |_____^ | -note: the lint level is defined here - --> $DIR/shared_at_top.rs:2:9 - | -LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ note: same as this --> $DIR/shared_at_top.rs:98:12 | @@ -116,6 +111,11 @@ LL | } else { LL | | println!("This should trigger `IS_SAME_THAN_ELSE` as usual"); LL | | } | |_____^ +note: the lint level is defined here + --> $DIR/shared_at_top.rs:2:9 + | +LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 7 previous errors diff --git a/tests/ui/branches_sharing_code/shared_at_top_and_bottom.stderr b/tests/ui/branches_sharing_code/shared_at_top_and_bottom.stderr index a270f637f2b9..3edb8e53a7d4 100644 --- a/tests/ui/branches_sharing_code/shared_at_top_and_bottom.stderr +++ b/tests/ui/branches_sharing_code/shared_at_top_and_bottom.stderr @@ -7,17 +7,17 @@ LL | | let _overlap_start = t * 2; LL | | let _overlap_end = 2 * t; | |_________________________________^ | -note: the lint level is defined here - --> $DIR/shared_at_top_and_bottom.rs:2:36 - | -LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: this code is shared at the end --> $DIR/shared_at_top_and_bottom.rs:28:5 | LL | / let _u = 9; LL | | } | |_____^ +note: the lint level is defined here + --> $DIR/shared_at_top_and_bottom.rs:2:36 + | +LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider moving these statements before the if | LL ~ let t = 7; diff --git a/tests/ui/branches_sharing_code/valid_if_blocks.stderr b/tests/ui/branches_sharing_code/valid_if_blocks.stderr index a815995e7172..d2acd6d9735c 100644 --- a/tests/ui/branches_sharing_code/valid_if_blocks.stderr +++ b/tests/ui/branches_sharing_code/valid_if_blocks.stderr @@ -6,11 +6,6 @@ LL | if false { LL | | } else { | |_____^ | -note: the lint level is defined here - --> $DIR/valid_if_blocks.rs:2:9 - | -LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ note: same as this --> $DIR/valid_if_blocks.rs:105:12 | @@ -18,6 +13,11 @@ LL | } else { | ____________^ LL | | } | |_____^ +note: the lint level is defined here + --> $DIR/valid_if_blocks.rs:2:9 + | +LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: this `if` has identical blocks --> $DIR/valid_if_blocks.rs:115:15 diff --git a/tests/ui/case_sensitive_file_extension_comparisons.stderr b/tests/ui/case_sensitive_file_extension_comparisons.stderr index 5d9a043edb9a..a28dd8bd5ad3 100644 --- a/tests/ui/case_sensitive_file_extension_comparisons.stderr +++ b/tests/ui/case_sensitive_file_extension_comparisons.stderr @@ -4,8 +4,8 @@ error: case-sensitive file extension comparison LL | filename.ends_with(".rs") | ^^^^^^^^^^^^^^^^ | - = note: `-D clippy::case-sensitive-file-extension-comparisons` implied by `-D warnings` = help: consider using a case-insensitive comparison instead + = note: `-D clippy::case-sensitive-file-extension-comparisons` implied by `-D warnings` error: case-sensitive file extension comparison --> $DIR/case_sensitive_file_extension_comparisons.rs:17:27 diff --git a/tests/ui/char_lit_as_u8.stderr b/tests/ui/char_lit_as_u8.stderr index b9836d2f2553..39fc9d6dda67 100644 --- a/tests/ui/char_lit_as_u8.stderr +++ b/tests/ui/char_lit_as_u8.stderr @@ -4,8 +4,8 @@ error: casting a character literal to `u8` truncates LL | let _ = '❤' as u8; // no suggestion, since a byte literal won't work. | ^^^^^^^^^ | - = note: `-D clippy::char-lit-as-u8` implied by `-D warnings` = note: `char` is four bytes wide, but `u8` is a single byte + = note: `-D clippy::char-lit-as-u8` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/char_lit_as_u8_suggestions.stderr b/tests/ui/char_lit_as_u8_suggestions.stderr index bf7cb1607b4e..586174c50882 100644 --- a/tests/ui/char_lit_as_u8_suggestions.stderr +++ b/tests/ui/char_lit_as_u8_suggestions.stderr @@ -4,8 +4,8 @@ error: casting a character literal to `u8` truncates LL | let _ = 'a' as u8; | ^^^^^^^^^ help: use a byte literal instead: `b'a'` | - = note: `-D clippy::char-lit-as-u8` implied by `-D warnings` = note: `char` is four bytes wide, but `u8` is a single byte + = note: `-D clippy::char-lit-as-u8` implied by `-D warnings` error: casting a character literal to `u8` truncates --> $DIR/char_lit_as_u8_suggestions.rs:7:13 diff --git a/tests/ui/checked_unwrap/complex_conditionals.stderr b/tests/ui/checked_unwrap/complex_conditionals.stderr index 46c6f69708eb..d44d5072e485 100644 --- a/tests/ui/checked_unwrap/complex_conditionals.stderr +++ b/tests/ui/checked_unwrap/complex_conditionals.stderr @@ -6,12 +6,12 @@ LL | if x.is_ok() && y.is_err() { LL | x.unwrap(); // unnecessary | ^^^^^^^^^^ | + = help: try using `if let` or `match` note: the lint level is defined here --> $DIR/complex_conditionals.rs:1:35 | LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: try using `if let` or `match` error: this call to `unwrap_err()` will always panic --> $DIR/complex_conditionals.rs:9:9 diff --git a/tests/ui/cognitive_complexity.stderr b/tests/ui/cognitive_complexity.stderr index a0ddc673abcc..d7f2f24e52f2 100644 --- a/tests/ui/cognitive_complexity.stderr +++ b/tests/ui/cognitive_complexity.stderr @@ -4,8 +4,8 @@ error: the function has a cognitive complexity of (28/25) LL | fn main() { | ^^^^ | - = note: `-D clippy::cognitive-complexity` implied by `-D warnings` = help: you could split it up into multiple smaller functions + = note: `-D clippy::cognitive-complexity` implied by `-D warnings` error: the function has a cognitive complexity of (7/1) --> $DIR/cognitive_complexity.rs:91:4 diff --git a/tests/ui/cognitive_complexity_attr_used.stderr b/tests/ui/cognitive_complexity_attr_used.stderr index f5ff53dda603..bb48f3297486 100644 --- a/tests/ui/cognitive_complexity_attr_used.stderr +++ b/tests/ui/cognitive_complexity_attr_used.stderr @@ -4,8 +4,8 @@ error: the function has a cognitive complexity of (3/0) LL | fn kaboom() { | ^^^^^^ | - = note: `-D clippy::cognitive-complexity` implied by `-D warnings` = help: you could split it up into multiple smaller functions + = note: `-D clippy::cognitive-complexity` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/collapsible_match.stderr b/tests/ui/collapsible_match.stderr index 5f18b6935029..33562e8401ca 100644 --- a/tests/ui/collapsible_match.stderr +++ b/tests/ui/collapsible_match.stderr @@ -8,7 +8,6 @@ LL | | _ => return, LL | | }, | |_________^ | - = note: `-D clippy::collapsible-match` implied by `-D warnings` help: the outer pattern can be modified to include the inner pattern --> $DIR/collapsible_match.rs:12:12 | @@ -16,6 +15,7 @@ LL | Ok(val) => match val { | ^^^ replace this binding LL | Some(n) => foo(n), | ^^^^^^^ with this pattern + = note: `-D clippy::collapsible-match` implied by `-D warnings` error: this `match` can be collapsed into the outer `match` --> $DIR/collapsible_match.rs:21:20 diff --git a/tests/ui/collapsible_match2.stderr b/tests/ui/collapsible_match2.stderr index fe64e4693792..144dbe40a7ad 100644 --- a/tests/ui/collapsible_match2.stderr +++ b/tests/ui/collapsible_match2.stderr @@ -8,7 +8,6 @@ LL | | _ => return, LL | | }, | |_____________^ | - = note: `-D clippy::collapsible-match` implied by `-D warnings` help: the outer pattern can be modified to include the inner pattern --> $DIR/collapsible_match2.rs:13:16 | @@ -16,6 +15,7 @@ LL | Ok(val) if make() => match val { | ^^^ replace this binding LL | Some(n) => foo(n), | ^^^^^^^ with this pattern + = note: `-D clippy::collapsible-match` implied by `-D warnings` error: this `match` can be collapsed into the outer `match` --> $DIR/collapsible_match2.rs:20:24 diff --git a/tests/ui/comparison_chain.stderr b/tests/ui/comparison_chain.stderr index be25a80dde0a..2eeb50202cd4 100644 --- a/tests/ui/comparison_chain.stderr +++ b/tests/ui/comparison_chain.stderr @@ -8,8 +8,8 @@ LL | | b() LL | | } | |_____^ | - = note: `-D clippy::comparison-chain` implied by `-D warnings` = help: consider rewriting the `if` chain to use `cmp` and `match` + = note: `-D clippy::comparison-chain` implied by `-D warnings` error: `if` chain can be rewritten with `match` --> $DIR/comparison_chain.rs:27:5 diff --git a/tests/ui/copy_iterator.stderr b/tests/ui/copy_iterator.stderr index f8ce6af7961a..6bc6fd6b6fa8 100644 --- a/tests/ui/copy_iterator.stderr +++ b/tests/ui/copy_iterator.stderr @@ -10,8 +10,8 @@ LL | | } LL | | } | |_^ | - = note: `-D clippy::copy-iterator` implied by `-D warnings` = note: consider implementing `IntoIterator` instead + = note: `-D clippy::copy-iterator` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/crashes/ice-360.stderr b/tests/ui/crashes/ice-360.stderr index 0eb7bb12b354..a2e2ab8fd192 100644 --- a/tests/ui/crashes/ice-360.stderr +++ b/tests/ui/crashes/ice-360.stderr @@ -18,8 +18,8 @@ error: empty `loop {}` wastes CPU cycles LL | loop {} | ^^^^^^^ | - = note: `-D clippy::empty-loop` implied by `-D warnings` = help: you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body + = note: `-D clippy::empty-loop` implied by `-D warnings` error: aborting due to 2 previous errors diff --git a/tests/ui/crashes/ice-6254.stderr b/tests/ui/crashes/ice-6254.stderr index f37ab2e9b0c7..22d82a30c6aa 100644 --- a/tests/ui/crashes/ice-6254.stderr +++ b/tests/ui/crashes/ice-6254.stderr @@ -4,9 +4,9 @@ error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated wit LL | FOO_REF_REF => {}, | ^^^^^^^^^^^ | - = note: `-D indirect-structural-match` implied by `-D warnings` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #62411 + = note: `-D indirect-structural-match` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/crashes/ice-7868.stderr b/tests/ui/crashes/ice-7868.stderr index 1a33e647588f..1d8314e889fa 100644 --- a/tests/ui/crashes/ice-7868.stderr +++ b/tests/ui/crashes/ice-7868.stderr @@ -4,8 +4,8 @@ error: unsafe block missing a safety comment LL | unsafe { 0 }; | ^^^^^^^^^^^^ | - = note: `-D clippy::undocumented-unsafe-blocks` implied by `-D warnings` = help: consider adding a safety comment on the preceding line + = note: `-D clippy::undocumented-unsafe-blocks` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/crashes/ice-7869.stderr b/tests/ui/crashes/ice-7869.stderr index 4fa9fb27e765..35d1e8fd2957 100644 --- a/tests/ui/crashes/ice-7869.stderr +++ b/tests/ui/crashes/ice-7869.stderr @@ -8,8 +8,8 @@ LL | | TyöValmis, LL | | } | |_^ | - = note: `-D clippy::enum-variant-names` implied by `-D warnings` = help: remove the prefixes and use full paths to the variants instead of glob imports + = note: `-D clippy::enum-variant-names` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/crashes/ice-9463.stderr b/tests/ui/crashes/ice-9463.stderr index 7daa08aeb6c9..b0ce306d6838 100644 --- a/tests/ui/crashes/ice-9463.stderr +++ b/tests/ui/crashes/ice-9463.stderr @@ -22,8 +22,8 @@ error: literal out of range for `u32` LL | let _y = 1u32 >> 10000000000000u32; | ^^^^^^^^^^^^^^^^^ | - = note: `#[deny(overflowing_literals)]` on by default = note: the literal `10000000000000u32` does not fit into the type `u32` whose range is `0..=4294967295` + = note: `#[deny(overflowing_literals)]` on by default error: aborting due to 3 previous errors diff --git a/tests/ui/crate_level_checks/entrypoint_recursion.stderr b/tests/ui/crate_level_checks/entrypoint_recursion.stderr index 459cf12a1c20..3d79a115cb30 100644 --- a/tests/ui/crate_level_checks/entrypoint_recursion.stderr +++ b/tests/ui/crate_level_checks/entrypoint_recursion.stderr @@ -4,8 +4,8 @@ error: recursing into entrypoint `a` LL | a(); | ^ | - = note: `-D clippy::main-recursion` implied by `-D warnings` = help: consider using another function for this recursion + = note: `-D clippy::main-recursion` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/crate_level_checks/no_std_swap.stderr b/tests/ui/crate_level_checks/no_std_swap.stderr index 48152d8ad774..7d8ea3f76b0f 100644 --- a/tests/ui/crate_level_checks/no_std_swap.stderr +++ b/tests/ui/crate_level_checks/no_std_swap.stderr @@ -5,8 +5,8 @@ LL | / a = b; LL | | b = a; | |_________^ help: try: `core::mem::swap(&mut a, &mut b)` | - = note: `-D clippy::almost-swapped` implied by `-D warnings` = note: or maybe you should use `core::mem::replace`? + = note: `-D clippy::almost-swapped` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/crate_level_checks/std_main_recursion.stderr b/tests/ui/crate_level_checks/std_main_recursion.stderr index 0a260f9d2309..82c68bd1cfef 100644 --- a/tests/ui/crate_level_checks/std_main_recursion.stderr +++ b/tests/ui/crate_level_checks/std_main_recursion.stderr @@ -4,8 +4,8 @@ error: recursing into entrypoint `main` LL | main(); | ^^^^ | - = note: `-D clippy::main-recursion` implied by `-D warnings` = help: consider using another function for this recursion + = note: `-D clippy::main-recursion` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/def_id_nocore.stderr b/tests/ui/def_id_nocore.stderr index 6210d7c6cfd8..f8fc17e872bd 100644 --- a/tests/ui/def_id_nocore.stderr +++ b/tests/ui/def_id_nocore.stderr @@ -4,8 +4,8 @@ error: methods called `as_*` usually take `self` by reference or `self` by mutab LL | pub fn as_ref(self) -> &'static str { | ^^^^ | - = note: `-D clippy::wrong-self-convention` implied by `-D warnings` = help: consider choosing a less ambiguous name + = note: `-D clippy::wrong-self-convention` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/default_union_representation.stderr b/tests/ui/default_union_representation.stderr index 138884af868c..8b7ed94cbc61 100644 --- a/tests/ui/default_union_representation.stderr +++ b/tests/ui/default_union_representation.stderr @@ -7,8 +7,8 @@ LL | | b: u32, LL | | } | |_^ | - = note: `-D clippy::default-union-representation` implied by `-D warnings` = help: consider annotating `NoAttribute` with `#[repr(C)]` to explicitly specify memory layout + = note: `-D clippy::default-union-representation` implied by `-D warnings` error: this union has the default representation --> $DIR/default_union_representation.rs:16:1 diff --git a/tests/ui/derive.stderr b/tests/ui/derive.stderr index 82a70ceecc36..e1fbb8dcd1ee 100644 --- a/tests/ui/derive.stderr +++ b/tests/ui/derive.stderr @@ -8,7 +8,6 @@ LL | | } LL | | } | |_^ | - = note: `-D clippy::expl-impl-clone-on-copy` implied by `-D warnings` note: consider deriving `Clone` or removing `Copy` --> $DIR/derive.rs:8:1 | @@ -18,6 +17,7 @@ LL | | Qux LL | | } LL | | } | |_^ + = note: `-D clippy::expl-impl-clone-on-copy` implied by `-D warnings` error: you are implementing `Clone` explicitly on a `Copy` type --> $DIR/derive.rs:32:1 diff --git a/tests/ui/derive_hash_xor_eq.stderr b/tests/ui/derive_hash_xor_eq.stderr index 2a4abb0c5193..16c92397804e 100644 --- a/tests/ui/derive_hash_xor_eq.stderr +++ b/tests/ui/derive_hash_xor_eq.stderr @@ -4,12 +4,12 @@ error: you are deriving `Hash` but have implemented `PartialEq` explicitly LL | #[derive(Hash)] | ^^^^ | - = note: `#[deny(clippy::derive_hash_xor_eq)]` on by default note: `PartialEq` implemented here --> $DIR/derive_hash_xor_eq.rs:15:1 | LL | impl PartialEq for Bar { | ^^^^^^^^^^^^^^^^^^^^^^ + = note: `#[deny(clippy::derive_hash_xor_eq)]` on by default = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info) error: you are deriving `Hash` but have implemented `PartialEq` explicitly diff --git a/tests/ui/derive_ord_xor_partial_ord.stderr b/tests/ui/derive_ord_xor_partial_ord.stderr index baf8341aba90..58efbb8541f6 100644 --- a/tests/ui/derive_ord_xor_partial_ord.stderr +++ b/tests/ui/derive_ord_xor_partial_ord.stderr @@ -4,12 +4,12 @@ error: you are deriving `Ord` but have implemented `PartialOrd` explicitly LL | #[derive(Ord, PartialEq, Eq)] | ^^^ | - = note: `-D clippy::derive-ord-xor-partial-ord` implied by `-D warnings` note: `PartialOrd` implemented here --> $DIR/derive_ord_xor_partial_ord.rs:24:1 | LL | impl PartialOrd for DeriveOrd { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: `-D clippy::derive-ord-xor-partial-ord` implied by `-D warnings` = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) error: you are deriving `Ord` but have implemented `PartialOrd` explicitly diff --git a/tests/ui/doc/unbalanced_ticks.stderr b/tests/ui/doc/unbalanced_ticks.stderr index a462b98871a8..f2ac6bc3269a 100644 --- a/tests/ui/doc/unbalanced_ticks.stderr +++ b/tests/ui/doc/unbalanced_ticks.stderr @@ -7,8 +7,8 @@ LL | | /// Because of the initial `unbalanced_tick` pair, the error message is LL | | /// very `confusing_and_misleading`. | |____________________________________^ | - = note: `-D clippy::doc-markdown` implied by `-D warnings` = help: a backtick may be missing a pair + = note: `-D clippy::doc-markdown` implied by `-D warnings` error: backticks are unbalanced --> $DIR/unbalanced_ticks.rs:13:1 diff --git a/tests/ui/double_must_use.stderr b/tests/ui/double_must_use.stderr index 8290ece1cad1..3d34557a881b 100644 --- a/tests/ui/double_must_use.stderr +++ b/tests/ui/double_must_use.stderr @@ -4,8 +4,8 @@ error: this function has an empty `#[must_use]` attribute, but returns a type al LL | pub fn must_use_result() -> Result<(), ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::double-must-use` implied by `-D warnings` = help: either add some descriptive text or remove the attribute + = note: `-D clippy::double-must-use` implied by `-D warnings` error: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]` --> $DIR/double_must_use.rs:10:1 diff --git a/tests/ui/drop_forget_copy.stderr b/tests/ui/drop_forget_copy.stderr index 88228afae89c..21adb3b3a504 100644 --- a/tests/ui/drop_forget_copy.stderr +++ b/tests/ui/drop_forget_copy.stderr @@ -4,12 +4,12 @@ error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a LL | drop(s1); | ^^^^^^^^ | - = note: `-D clippy::drop-copy` implied by `-D warnings` note: argument has type `SomeStruct` --> $DIR/drop_forget_copy.rs:33:10 | LL | drop(s1); | ^^ + = note: `-D clippy::drop-copy` implied by `-D warnings` 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 @@ -41,12 +41,12 @@ error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetti LL | forget(s1); | ^^^^^^^^^^ | - = note: `-D clippy::forget-copy` implied by `-D warnings` note: argument has type `SomeStruct` --> $DIR/drop_forget_copy.rs:39:12 | LL | forget(s1); | ^^ + = note: `-D clippy::forget-copy` implied by `-D warnings` 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 diff --git a/tests/ui/drop_non_drop.stderr b/tests/ui/drop_non_drop.stderr index 30121033de7e..b86057c0c321 100644 --- a/tests/ui/drop_non_drop.stderr +++ b/tests/ui/drop_non_drop.stderr @@ -4,12 +4,12 @@ error: call to `std::mem::drop` with a value that does not implement `Drop`. Dro LL | drop(Foo); | ^^^^^^^^^ | - = note: `-D clippy::drop-non-drop` implied by `-D warnings` note: argument has type `main::Foo` --> $DIR/drop_non_drop.rs:22:10 | LL | drop(Foo); | ^^^ + = note: `-D clippy::drop-non-drop` implied by `-D warnings` error: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes --> $DIR/drop_non_drop.rs:37:5 diff --git a/tests/ui/drop_ref.stderr b/tests/ui/drop_ref.stderr index 531849f0680a..4743cf79b5d3 100644 --- a/tests/ui/drop_ref.stderr +++ b/tests/ui/drop_ref.stderr @@ -4,12 +4,12 @@ error: calls to `std::mem::drop` with a reference instead of an owned value. Dro LL | drop(&SomeStruct); | ^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::drop-ref` implied by `-D warnings` note: argument has type `&SomeStruct` --> $DIR/drop_ref.rs:11:10 | LL | drop(&SomeStruct); | ^^^^^^^^^^^ + = note: `-D clippy::drop-ref` implied by `-D warnings` 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 diff --git a/tests/ui/else_if_without_else.stderr b/tests/ui/else_if_without_else.stderr index 6f47658cfb18..90ccfb4fad64 100644 --- a/tests/ui/else_if_without_else.stderr +++ b/tests/ui/else_if_without_else.stderr @@ -8,8 +8,8 @@ LL | | println!("else if"); LL | | } | |_____^ | - = note: `-D clippy::else-if-without-else` implied by `-D warnings` = help: add an `else` block here + = note: `-D clippy::else-if-without-else` implied by `-D warnings` error: `if` expression with an `else if`, but without a final `else` --> $DIR/else_if_without_else.rs:54:12 diff --git a/tests/ui/empty_enum.stderr b/tests/ui/empty_enum.stderr index 7125e5f602b7..0d9aa5818e28 100644 --- a/tests/ui/empty_enum.stderr +++ b/tests/ui/empty_enum.stderr @@ -4,8 +4,8 @@ error: enum with no variants LL | enum Empty {} | ^^^^^^^^^^^^^ | - = note: `-D clippy::empty-enum` implied by `-D warnings` = help: consider using the uninhabited type `!` (never type) or a wrapper around it to introduce a type which can't be instantiated + = note: `-D clippy::empty-enum` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/empty_loop.stderr b/tests/ui/empty_loop.stderr index 555f3d3d884a..7602412334bb 100644 --- a/tests/ui/empty_loop.stderr +++ b/tests/ui/empty_loop.stderr @@ -4,8 +4,8 @@ error: empty `loop {}` wastes CPU cycles LL | loop {} | ^^^^^^^ | - = note: `-D clippy::empty-loop` implied by `-D warnings` = help: you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body + = note: `-D clippy::empty-loop` implied by `-D warnings` error: empty `loop {}` wastes CPU cycles --> $DIR/empty_loop.rs:11:9 diff --git a/tests/ui/empty_loop_no_std.stderr b/tests/ui/empty_loop_no_std.stderr index 5ded35a6f0d8..71af64f49d52 100644 --- a/tests/ui/empty_loop_no_std.stderr +++ b/tests/ui/empty_loop_no_std.stderr @@ -4,8 +4,8 @@ error: empty `loop {}` wastes CPU cycles LL | loop {} | ^^^^^^^ | - = note: `-D clippy::empty-loop` implied by `-D warnings` = help: you should either use `panic!()` or add a call pausing or sleeping the thread to the loop body + = note: `-D clippy::empty-loop` implied by `-D warnings` error: empty `loop {}` wastes CPU cycles --> $DIR/empty_loop_no_std.rs:25:5 diff --git a/tests/ui/expect.stderr b/tests/ui/expect.stderr index 904c09046452..f6738865cac1 100644 --- a/tests/ui/expect.stderr +++ b/tests/ui/expect.stderr @@ -4,8 +4,8 @@ error: used `expect()` on `an Option` value LL | let _ = opt.expect(""); | ^^^^^^^^^^^^^^ | - = note: `-D clippy::expect-used` implied by `-D warnings` = help: if this value is `None`, it will panic + = note: `-D clippy::expect-used` implied by `-D warnings` error: used `expect()` on `a Result` value --> $DIR/expect.rs:10:13 diff --git a/tests/ui/fallible_impl_from.stderr b/tests/ui/fallible_impl_from.stderr index d637dbce5d79..28a061af664d 100644 --- a/tests/ui/fallible_impl_from.stderr +++ b/tests/ui/fallible_impl_from.stderr @@ -8,17 +8,17 @@ LL | | } LL | | } | |_^ | -note: the lint level is defined here - --> $DIR/fallible_impl_from.rs:1:9 - | -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 note: potential failure(s) --> $DIR/fallible_impl_from.rs:7:13 | LL | Foo(s.parse().unwrap()) | ^^^^^^^^^^^^^^^^^^ +note: the lint level is defined here + --> $DIR/fallible_impl_from.rs:1:9 + | +LL | #![deny(clippy::fallible_impl_from)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: consider implementing `TryFrom` instead --> $DIR/fallible_impl_from.rs:26:1 diff --git a/tests/ui/field_reassign_with_default.stderr b/tests/ui/field_reassign_with_default.stderr index 3ce4b91a5486..710bb66a48a4 100644 --- a/tests/ui/field_reassign_with_default.stderr +++ b/tests/ui/field_reassign_with_default.stderr @@ -4,12 +4,12 @@ error: field assignment outside of initializer for an instance created with Defa LL | a.i = 42; | ^^^^^^^^^ | - = note: `-D clippy::field-reassign-with-default` implied by `-D warnings` note: consider initializing the variable with `main::A { i: 42, ..Default::default() }` and removing relevant reassignments --> $DIR/field_reassign_with_default.rs:62:5 | LL | let mut a: A = Default::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: `-D clippy::field-reassign-with-default` implied by `-D warnings` error: field assignment outside of initializer for an instance created with Default::default() --> $DIR/field_reassign_with_default.rs:103:5 diff --git a/tests/ui/filetype_is_file.stderr b/tests/ui/filetype_is_file.stderr index cd1e3ac37fe8..e51a90d6cfd2 100644 --- a/tests/ui/filetype_is_file.stderr +++ b/tests/ui/filetype_is_file.stderr @@ -4,8 +4,8 @@ error: `FileType::is_file()` only covers regular files LL | if fs::metadata("foo.txt")?.file_type().is_file() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::filetype-is-file` implied by `-D warnings` = help: use `!FileType::is_dir()` instead + = note: `-D clippy::filetype-is-file` implied by `-D warnings` error: `!FileType::is_file()` only denies regular files --> $DIR/filetype_is_file.rs:13:8 diff --git a/tests/ui/float_cmp.stderr b/tests/ui/float_cmp.stderr index 9cc1f1b75ed4..e3e9f3949fdf 100644 --- a/tests/ui/float_cmp.stderr +++ b/tests/ui/float_cmp.stderr @@ -4,8 +4,8 @@ error: strict comparison of `f32` or `f64` LL | ONE as f64 != 2.0; | ^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(ONE as f64 - 2.0).abs() > error_margin` | - = note: `-D clippy::float-cmp` implied by `-D warnings` = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin` + = note: `-D clippy::float-cmp` implied by `-D warnings` error: strict comparison of `f32` or `f64` --> $DIR/float_cmp.rs:62:5 diff --git a/tests/ui/float_cmp_const.stderr b/tests/ui/float_cmp_const.stderr index d8182cf855b0..65c45648ab38 100644 --- a/tests/ui/float_cmp_const.stderr +++ b/tests/ui/float_cmp_const.stderr @@ -4,8 +4,8 @@ error: strict comparison of `f32` or `f64` constant LL | 1f32 == ONE; | ^^^^^^^^^^^ help: consider comparing them within some margin of error: `(1f32 - ONE).abs() < error_margin` | - = note: `-D clippy::float-cmp-const` implied by `-D warnings` = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin` + = note: `-D clippy::float-cmp-const` implied by `-D warnings` error: strict comparison of `f32` or `f64` constant --> $DIR/float_cmp_const.rs:17:5 diff --git a/tests/ui/fn_params_excessive_bools.stderr b/tests/ui/fn_params_excessive_bools.stderr index cd9d07fa115d..11627105691b 100644 --- a/tests/ui/fn_params_excessive_bools.stderr +++ b/tests/ui/fn_params_excessive_bools.stderr @@ -4,8 +4,8 @@ error: more than 3 bools in function parameters LL | fn g(_: bool, _: bool, _: bool, _: bool) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::fn-params-excessive-bools` implied by `-D warnings` = help: consider refactoring bools into two-variant enums + = note: `-D clippy::fn-params-excessive-bools` implied by `-D warnings` error: more than 3 bools in function parameters --> $DIR/fn_params_excessive_bools.rs:21:1 diff --git a/tests/ui/for_loops_over_fallibles.stderr b/tests/ui/for_loops_over_fallibles.stderr index 8c8c022243ae..68d2735b040e 100644 --- a/tests/ui/for_loops_over_fallibles.stderr +++ b/tests/ui/for_loops_over_fallibles.stderr @@ -4,8 +4,8 @@ error: for loop over `option`, which is an `Option`. This is more readably writt 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` + = note: `-D clippy::for-loops-over-fallibles` implied by `-D warnings` 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:14:14 diff --git a/tests/ui/forget_non_drop.stderr b/tests/ui/forget_non_drop.stderr index 03fb00960a44..194e37c8b424 100644 --- a/tests/ui/forget_non_drop.stderr +++ b/tests/ui/forget_non_drop.stderr @@ -4,12 +4,12 @@ error: call to `std::mem::forget` with a value that does not implement `Drop`. F LL | forget(Foo); | ^^^^^^^^^^^ | - = note: `-D clippy::forget-non-drop` implied by `-D warnings` note: argument has type `main::Foo` --> $DIR/forget_non_drop.rs:13:12 | LL | forget(Foo); | ^^^ + = note: `-D clippy::forget-non-drop` implied by `-D warnings` error: call to `std::mem::forget` with a value that does not implement `Drop`. Forgetting such a type is the same as dropping it --> $DIR/forget_non_drop.rs:24:5 diff --git a/tests/ui/forget_ref.stderr b/tests/ui/forget_ref.stderr index df5cd8cacdb8..011cdefc665f 100644 --- a/tests/ui/forget_ref.stderr +++ b/tests/ui/forget_ref.stderr @@ -4,12 +4,12 @@ error: calls to `std::mem::forget` with a reference instead of an owned value. F LL | forget(&SomeStruct); | ^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::forget-ref` implied by `-D warnings` note: argument has type `&SomeStruct` --> $DIR/forget_ref.rs:11:12 | LL | forget(&SomeStruct); | ^^^^^^^^^^^ + = note: `-D clippy::forget-ref` implied by `-D warnings` 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 diff --git a/tests/ui/format_args_unfixable.stderr b/tests/ui/format_args_unfixable.stderr index 4476218ad58e..37a6afb1ba7b 100644 --- a/tests/ui/format_args_unfixable.stderr +++ b/tests/ui/format_args_unfixable.stderr @@ -4,9 +4,9 @@ error: `format!` in `println!` args LL | println!("error: {}", format!("something failed at {}", Location::caller())); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::format-in-format-args` implied by `-D warnings` = help: combine the `format!(..)` arguments with the outer `println!(..)` call = help: or consider changing `format!` to `format_args!` + = note: `-D clippy::format-in-format-args` implied by `-D warnings` error: `format!` in `println!` args --> $DIR/format_args_unfixable.rs:28:5 diff --git a/tests/ui/format_push_string.stderr b/tests/ui/format_push_string.stderr index 953784bcc068..d7be9a5f206c 100644 --- a/tests/ui/format_push_string.stderr +++ b/tests/ui/format_push_string.stderr @@ -4,8 +4,8 @@ error: `format!(..)` appended to existing `String` LL | string += &format!("{:?}", 1234); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::format-push-string` implied by `-D warnings` = help: consider using `write!` to avoid the extra allocation + = note: `-D clippy::format-push-string` implied by `-D warnings` error: `format!(..)` appended to existing `String` --> $DIR/format_push_string.rs:6:5 diff --git a/tests/ui/formatting.stderr b/tests/ui/formatting.stderr index 9272cd604844..caccd5cba178 100644 --- a/tests/ui/formatting.stderr +++ b/tests/ui/formatting.stderr @@ -4,8 +4,8 @@ error: this looks like you are trying to use `.. -= ..`, but you really are doin LL | a =- 35; | ^^^^ | - = note: `-D clippy::suspicious-assignment-formatting` implied by `-D warnings` = note: to remove this lint, use either `-=` or `= -` + = note: `-D clippy::suspicious-assignment-formatting` implied by `-D warnings` error: this looks like you are trying to use `.. *= ..`, but you really are doing `.. = (* ..)` --> $DIR/formatting.rs:17:6 @@ -29,8 +29,8 @@ error: possibly missing a comma here LL | -1, -2, -3 // <= no comma here | ^ | - = note: `-D clippy::possible-missing-comma` implied by `-D warnings` = note: to remove this lint, add a comma or write the expr in a single line + = note: `-D clippy::possible-missing-comma` implied by `-D warnings` error: possibly missing a comma here --> $DIR/formatting.rs:33:19 diff --git a/tests/ui/from_over_into.stderr b/tests/ui/from_over_into.stderr index 2951e6bdac43..469adadd2196 100644 --- a/tests/ui/from_over_into.stderr +++ b/tests/ui/from_over_into.stderr @@ -4,8 +4,8 @@ error: an implementation of `From` is preferred since it gives you `Into<_>` for LL | impl Into for String { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::from-over-into` implied by `-D warnings` = help: consider to implement `From` instead + = note: `-D clippy::from-over-into` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/future_not_send.stderr b/tests/ui/future_not_send.stderr index a9f2ad36d0ab..5b6858e4568b 100644 --- a/tests/ui/future_not_send.stderr +++ b/tests/ui/future_not_send.stderr @@ -4,7 +4,6 @@ error: future cannot be sent between threads safely LL | async fn private_future(rc: Rc<[u8]>, cell: &Cell) -> bool { | ^^^^ future returned by `private_future` is not `Send` | - = note: `-D clippy::future-not-send` implied by `-D warnings` note: future is not `Send` as this value is used across an await --> $DIR/future_not_send.rs:8:19 | @@ -25,6 +24,7 @@ LL | async { true }.await LL | } | - `cell` is later dropped here = note: `std::cell::Cell` doesn't implement `std::marker::Sync` + = note: `-D clippy::future-not-send` implied by `-D warnings` error: future cannot be sent between threads safely --> $DIR/future_not_send.rs:11:42 diff --git a/tests/ui/get_unwrap.stderr b/tests/ui/get_unwrap.stderr index ea8fec527351..937f85904083 100644 --- a/tests/ui/get_unwrap.stderr +++ b/tests/ui/get_unwrap.stderr @@ -16,8 +16,8 @@ error: used `unwrap()` on `an Option` value LL | let _ = boxed_slice.get(1).unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::unwrap-used` implied by `-D warnings` = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message + = note: `-D clippy::unwrap-used` implied by `-D warnings` error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise --> $DIR/get_unwrap.rs:36:17 diff --git a/tests/ui/if_let_mutex.stderr b/tests/ui/if_let_mutex.stderr index 8a4d5dbac592..da0cc25f0ab5 100644 --- a/tests/ui/if_let_mutex.stderr +++ b/tests/ui/if_let_mutex.stderr @@ -13,8 +13,8 @@ LL | | do_stuff(lock); LL | | }; | |_____^ | - = note: `-D clippy::if-let-mutex` implied by `-D warnings` = help: move the lock call outside of the `if let ...` expression + = note: `-D clippy::if-let-mutex` implied by `-D warnings` error: calling `Mutex::lock` inside the scope of another `Mutex::lock` causes a deadlock --> $DIR/if_let_mutex.rs:22:5 diff --git a/tests/ui/if_not_else.stderr b/tests/ui/if_not_else.stderr index 8c8cc44bb035..46671c15274f 100644 --- a/tests/ui/if_not_else.stderr +++ b/tests/ui/if_not_else.stderr @@ -8,8 +8,8 @@ LL | | println!("Bunny"); LL | | } | |_____^ | - = note: `-D clippy::if-not-else` implied by `-D warnings` = help: remove the `!` and swap the blocks of the `if`/`else` + = note: `-D clippy::if-not-else` implied by `-D warnings` error: unnecessary `!=` operation --> $DIR/if_not_else.rs:17:5 diff --git a/tests/ui/if_same_then_else.stderr b/tests/ui/if_same_then_else.stderr index 2cdf442486a3..fb23b81d36d7 100644 --- a/tests/ui/if_same_then_else.stderr +++ b/tests/ui/if_same_then_else.stderr @@ -11,7 +11,6 @@ LL | | foo(); LL | | } else { | |_____^ | - = note: `-D clippy::if-same-then-else` implied by `-D warnings` note: same as this --> $DIR/if_same_then_else.rs:31:12 | @@ -24,6 +23,7 @@ LL | | 0..10; LL | | foo(); LL | | } | |_____^ + = note: `-D clippy::if-same-then-else` implied by `-D warnings` error: this `if` has identical blocks --> $DIR/if_same_then_else.rs:67:21 diff --git a/tests/ui/if_same_then_else2.stderr b/tests/ui/if_same_then_else2.stderr index cac788f859d1..704cfd9669ac 100644 --- a/tests/ui/if_same_then_else2.stderr +++ b/tests/ui/if_same_then_else2.stderr @@ -11,7 +11,6 @@ LL | | } LL | | } else { | |_____^ | - = note: `-D clippy::if-same-then-else` implied by `-D warnings` note: same as this --> $DIR/if_same_then_else2.rs:23:12 | @@ -24,6 +23,7 @@ LL | | let bar: &Option<_> = &Some::(42); LL | | } LL | | } | |_____^ + = note: `-D clippy::if-same-then-else` implied by `-D warnings` error: this `if` has identical blocks --> $DIR/if_same_then_else2.rs:35:13 diff --git a/tests/ui/if_then_some_else_none.stderr b/tests/ui/if_then_some_else_none.stderr index c22ace30d2dc..24e0b5947f19 100644 --- a/tests/ui/if_then_some_else_none.stderr +++ b/tests/ui/if_then_some_else_none.stderr @@ -10,8 +10,8 @@ LL | | None LL | | }; | |_____^ | - = note: `-D clippy::if-then-some-else-none` implied by `-D warnings` = help: consider using `bool::then` like: `foo().then(|| { /* snippet */ "foo" })` + = note: `-D clippy::if-then-some-else-none` implied by `-D warnings` error: this could be simplified with `bool::then` --> $DIR/if_then_some_else_none.rs:14:13 diff --git a/tests/ui/ifs_same_cond.stderr b/tests/ui/ifs_same_cond.stderr index 0c8f49b8687f..4113087327a2 100644 --- a/tests/ui/ifs_same_cond.stderr +++ b/tests/ui/ifs_same_cond.stderr @@ -4,12 +4,12 @@ error: this `if` has the same condition as a previous `if` LL | } else if b { | ^ | - = note: `-D clippy::ifs-same-cond` implied by `-D warnings` note: same as this --> $DIR/ifs_same_cond.rs:8:8 | LL | if b { | ^ + = note: `-D clippy::ifs-same-cond` implied by `-D warnings` error: this `if` has the same condition as a previous `if` --> $DIR/ifs_same_cond.rs:14:15 diff --git a/tests/ui/impl.stderr b/tests/ui/impl.stderr index 8703ecac93e8..e28b1bf0cdd9 100644 --- a/tests/ui/impl.stderr +++ b/tests/ui/impl.stderr @@ -6,7 +6,6 @@ LL | | fn second() {} LL | | } | |_^ | - = note: `-D clippy::multiple-inherent-impl` implied by `-D warnings` note: first implementation here --> $DIR/impl.rs:6:1 | @@ -14,6 +13,7 @@ LL | / impl MyStruct { LL | | fn first() {} LL | | } | |_^ + = note: `-D clippy::multiple-inherent-impl` implied by `-D warnings` error: multiple implementations of this structure --> $DIR/impl.rs:24:5 diff --git a/tests/ui/indexing_slicing_index.stderr b/tests/ui/indexing_slicing_index.stderr index 6ae700753f06..a8d8b38163d0 100644 --- a/tests/ui/indexing_slicing_index.stderr +++ b/tests/ui/indexing_slicing_index.stderr @@ -16,8 +16,8 @@ error: indexing may panic LL | x[index]; | ^^^^^^^^ | - = note: `-D clippy::indexing-slicing` implied by `-D warnings` = help: consider using `.get(n)` or `.get_mut(n)` instead + = note: `-D clippy::indexing-slicing` implied by `-D warnings` error: indexing may panic --> $DIR/indexing_slicing_index.rs:38:5 diff --git a/tests/ui/indexing_slicing_slice.stderr b/tests/ui/indexing_slicing_slice.stderr index f70722b92a5b..dc54bd41365d 100644 --- a/tests/ui/indexing_slicing_slice.stderr +++ b/tests/ui/indexing_slicing_slice.stderr @@ -4,8 +4,8 @@ error: slicing may panic LL | &x[index..]; | ^^^^^^^^^^ | - = note: `-D clippy::indexing-slicing` implied by `-D warnings` = help: consider using `.get(n..)` or .get_mut(n..)` instead + = note: `-D clippy::indexing-slicing` implied by `-D warnings` error: slicing may panic --> $DIR/indexing_slicing_slice.rs:13:6 diff --git a/tests/ui/inefficient_to_string.stderr b/tests/ui/inefficient_to_string.stderr index 1c0490ffa44c..914dc92bfb65 100644 --- a/tests/ui/inefficient_to_string.stderr +++ b/tests/ui/inefficient_to_string.stderr @@ -4,12 +4,12 @@ error: calling `to_string` on `&&str` LL | let _: String = rrstr.to_string(); | ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstr).to_string()` | + = help: `&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString` note: the lint level is defined here --> $DIR/inefficient_to_string.rs:2:9 | LL | #![deny(clippy::inefficient_to_string)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: `&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString` error: calling `to_string` on `&&&str` --> $DIR/inefficient_to_string.rs:12:21 diff --git a/tests/ui/infinite_loop.stderr b/tests/ui/infinite_loop.stderr index 4ec7d900ade3..85258b9d64f9 100644 --- a/tests/ui/infinite_loop.stderr +++ b/tests/ui/infinite_loop.stderr @@ -4,8 +4,8 @@ error: variables in the condition are not mutated in the loop body LL | while y < 10 { | ^^^^^^ | - = note: `#[deny(clippy::while_immutable_condition)]` on by default = note: this may lead to an infinite or to a never running loop + = note: `#[deny(clippy::while_immutable_condition)]` on by default error: variables in the condition are not mutated in the loop body --> $DIR/infinite_loop.rs:25:11 diff --git a/tests/ui/inherent_to_string.stderr b/tests/ui/inherent_to_string.stderr index 4f331f5bec9e..443fecae1aad 100644 --- a/tests/ui/inherent_to_string.stderr +++ b/tests/ui/inherent_to_string.stderr @@ -6,8 +6,8 @@ LL | | "A.to_string()".to_string() LL | | } | |_____^ | - = note: `-D clippy::inherent-to-string` implied by `-D warnings` = help: implement trait `Display` for type `A` instead + = note: `-D clippy::inherent-to-string` implied by `-D warnings` error: type `C` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display` --> $DIR/inherent_to_string.rs:44:5 @@ -17,12 +17,12 @@ LL | | "C.to_string()".to_string() LL | | } | |_____^ | + = help: remove the inherent method from type `C` note: the lint level is defined here --> $DIR/inherent_to_string.rs:2:9 | LL | #![deny(clippy::inherent_to_string_shadow_display)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: remove the inherent method from type `C` error: aborting due to 2 previous errors diff --git a/tests/ui/inspect_for_each.stderr b/tests/ui/inspect_for_each.stderr index 9f976bb74584..67c2d5e53c78 100644 --- a/tests/ui/inspect_for_each.stderr +++ b/tests/ui/inspect_for_each.stderr @@ -9,8 +9,8 @@ LL | | b.push(z); LL | | }); | |______^ | - = note: `-D clippy::inspect-for-each` implied by `-D warnings` = help: move the code from `inspect(..)` to `for_each(..)` and remove the `inspect(..)` + = note: `-D clippy::inspect-for-each` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/integer_division.stderr b/tests/ui/integer_division.stderr index cbb7f8814249..ca8001279207 100644 --- a/tests/ui/integer_division.stderr +++ b/tests/ui/integer_division.stderr @@ -4,8 +4,8 @@ error: integer division 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 + = note: `-D clippy::integer-division` implied by `-D warnings` error: integer division --> $DIR/integer_division.rs:6:13 diff --git a/tests/ui/issue_4266.stderr b/tests/ui/issue_4266.stderr index e5042aaa776b..240f4bcc38fd 100644 --- a/tests/ui/issue_4266.stderr +++ b/tests/ui/issue_4266.stderr @@ -18,8 +18,8 @@ error: methods called `new` usually take no `self` LL | pub async fn new(&mut self) -> Self { | ^^^^^^^^^ | - = note: `-D clippy::wrong-self-convention` implied by `-D warnings` = help: consider choosing a less ambiguous name + = note: `-D clippy::wrong-self-convention` implied by `-D warnings` error: aborting due to 3 previous errors diff --git a/tests/ui/iter_nth.stderr b/tests/ui/iter_nth.stderr index d00b2fb672bb..a0fe353bcf75 100644 --- a/tests/ui/iter_nth.stderr +++ b/tests/ui/iter_nth.stderr @@ -4,8 +4,8 @@ error: called `.iter().nth()` on a Vec LL | let bad_vec = some_vec.iter().nth(3); | ^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::iter-nth` implied by `-D warnings` = help: calling `.get()` is both faster and more readable + = note: `-D clippy::iter-nth` implied by `-D warnings` error: called `.iter().nth()` on a slice --> $DIR/iter_nth.rs:34:26 diff --git a/tests/ui/iter_skip_next_unfixable.stderr b/tests/ui/iter_skip_next_unfixable.stderr index 74c327c74836..4062706f9420 100644 --- a/tests/ui/iter_skip_next_unfixable.stderr +++ b/tests/ui/iter_skip_next_unfixable.stderr @@ -4,12 +4,12 @@ error: called `skip(..).next()` on an iterator LL | let _: Vec<&str> = sp.skip(1).next().unwrap().split(' ').collect(); | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` | - = note: `-D clippy::iter-skip-next` implied by `-D warnings` help: for this change `sp` has to be mutable --> $DIR/iter_skip_next_unfixable.rs:8:9 | LL | let sp = test_string.split('|').map(|s| s.trim()); | ^^ + = note: `-D clippy::iter-skip-next` implied by `-D warnings` error: called `skip(..).next()` on an iterator --> $DIR/iter_skip_next_unfixable.rs:11:29 diff --git a/tests/ui/large_stack_arrays.stderr b/tests/ui/large_stack_arrays.stderr index 0d91b65b4284..c7bf941ad009 100644 --- a/tests/ui/large_stack_arrays.stderr +++ b/tests/ui/large_stack_arrays.stderr @@ -4,8 +4,8 @@ error: allocating a local array larger than 512000 bytes LL | [0u32; 20_000_000], | ^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::large-stack-arrays` implied by `-D warnings` = help: consider allocating on the heap with `vec![0u32; 20_000_000].into_boxed_slice()` + = note: `-D clippy::large-stack-arrays` implied by `-D warnings` error: allocating a local array larger than 512000 bytes --> $DIR/large_stack_arrays.rs:24:9 diff --git a/tests/ui/len_without_is_empty.stderr b/tests/ui/len_without_is_empty.stderr index a1f48f7610b4..8e890e2e2590 100644 --- a/tests/ui/len_without_is_empty.stderr +++ b/tests/ui/len_without_is_empty.stderr @@ -92,8 +92,8 @@ error: this returns a `Result<_, ()>` LL | pub fn len(&self) -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::result-unit-err` implied by `-D warnings` = help: use a custom `Error` type instead + = note: `-D clippy::result-unit-err` implied by `-D warnings` error: this returns a `Result<_, ()>` --> $DIR/len_without_is_empty.rs:240:5 diff --git a/tests/ui/let_if_seq.stderr b/tests/ui/let_if_seq.stderr index 271ccce681c9..f2e0edb6fbc3 100644 --- a/tests/ui/let_if_seq.stderr +++ b/tests/ui/let_if_seq.stderr @@ -7,8 +7,8 @@ LL | | foo = 42; LL | | } | |_____^ help: it is more idiomatic to write: `let foo = if f() { 42 } else { 0 };` | - = note: `-D clippy::useless-let-if-seq` implied by `-D warnings` = note: you might not need `mut` at all + = note: `-D clippy::useless-let-if-seq` implied by `-D warnings` error: `if _ { .. } else { .. }` is an expression --> $DIR/let_if_seq.rs:71:5 diff --git a/tests/ui/let_underscore_drop.stderr b/tests/ui/let_underscore_drop.stderr index ee7bbe995f16..324b7cd431d4 100644 --- a/tests/ui/let_underscore_drop.stderr +++ b/tests/ui/let_underscore_drop.stderr @@ -4,8 +4,8 @@ error: non-binding `let` on a type that implements `Drop` LL | let _ = Box::new(()); | ^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::let-underscore-drop` implied by `-D warnings` = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop` + = note: `-D clippy::let-underscore-drop` implied by `-D warnings` error: non-binding `let` on a type that implements `Drop` --> $DIR/let_underscore_drop.rs:18:5 diff --git a/tests/ui/let_underscore_lock.stderr b/tests/ui/let_underscore_lock.stderr index 4365b48fabb9..d7779e7b6c48 100644 --- a/tests/ui/let_underscore_lock.stderr +++ b/tests/ui/let_underscore_lock.stderr @@ -4,8 +4,8 @@ error: non-binding let on a synchronization lock LL | let _ = m.lock(); | ^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::let-underscore-lock` implied by `-D warnings` = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop` + = note: `-D clippy::let-underscore-lock` implied by `-D warnings` error: non-binding let on a synchronization lock --> $DIR/let_underscore_lock.rs:10:5 diff --git a/tests/ui/let_underscore_must_use.stderr b/tests/ui/let_underscore_must_use.stderr index 5b751ea56def..bae60f2ff9b7 100644 --- a/tests/ui/let_underscore_must_use.stderr +++ b/tests/ui/let_underscore_must_use.stderr @@ -4,8 +4,8 @@ error: non-binding let on a result of a `#[must_use]` function LL | let _ = f(); | ^^^^^^^^^^^^ | - = note: `-D clippy::let-underscore-must-use` implied by `-D warnings` = help: consider explicitly using function result + = note: `-D clippy::let-underscore-must-use` implied by `-D warnings` error: non-binding let on an expression with `#[must_use]` type --> $DIR/let_underscore_must_use.rs:68:5 diff --git a/tests/ui/linkedlist.stderr b/tests/ui/linkedlist.stderr index 51327df13211..c76c94961312 100644 --- a/tests/ui/linkedlist.stderr +++ b/tests/ui/linkedlist.stderr @@ -4,8 +4,8 @@ error: you seem to be using a `LinkedList`! Perhaps you meant some other data st LL | const C: LinkedList = LinkedList::new(); | ^^^^^^^^^^^^^^^ | - = note: `-D clippy::linkedlist` implied by `-D warnings` = help: a `VecDeque` might work + = note: `-D clippy::linkedlist` implied by `-D warnings` error: you seem to be using a `LinkedList`! Perhaps you meant some other data structure? --> $DIR/linkedlist.rs:9:11 diff --git a/tests/ui/manual_find.stderr b/tests/ui/manual_find.stderr index da0fd4aaef7d..ea04bb066e61 100644 --- a/tests/ui/manual_find.stderr +++ b/tests/ui/manual_find.stderr @@ -9,8 +9,8 @@ LL | | } LL | | None | |________^ help: replace with an iterator: `strings.into_iter().find(|s| s == String::new())` | - = note: `-D clippy::manual-find` implied by `-D warnings` = note: you may need to dereference some variables + = note: `-D clippy::manual-find` implied by `-D warnings` error: manual implementation of `Iterator::find` --> $DIR/manual_find.rs:14:5 diff --git a/tests/ui/manual_flatten.stderr b/tests/ui/manual_flatten.stderr index da053c056683..180a6ff4e9a7 100644 --- a/tests/ui/manual_flatten.stderr +++ b/tests/ui/manual_flatten.stderr @@ -11,7 +11,6 @@ LL | | } LL | | } | |_____^ | - = note: `-D clippy::manual-flatten` implied by `-D warnings` help: ...and remove the `if let` statement in the for loop --> $DIR/manual_flatten.rs:8:9 | @@ -19,6 +18,7 @@ LL | / if let Some(y) = n { LL | | println!("{}", y); LL | | } | |_________^ + = note: `-D clippy::manual-flatten` implied by `-D warnings` error: unnecessary `if let` since only the `Ok` variant of the iterator element is used --> $DIR/manual_flatten.rs:15:5 diff --git a/tests/ui/manual_non_exhaustive_enum.stderr b/tests/ui/manual_non_exhaustive_enum.stderr index 144fe86df554..087f766be70d 100644 --- a/tests/ui/manual_non_exhaustive_enum.stderr +++ b/tests/ui/manual_non_exhaustive_enum.stderr @@ -13,12 +13,12 @@ LL | | _C, LL | | } | |_^ | - = note: `-D clippy::manual-non-exhaustive` implied by `-D warnings` help: remove this variant --> $DIR/manual_non_exhaustive_enum.rs:9:5 | LL | _C, | ^^ + = note: `-D clippy::manual-non-exhaustive` implied by `-D warnings` error: this seems like a manual implementation of the non-exhaustive pattern --> $DIR/manual_non_exhaustive_enum.rs:14:1 diff --git a/tests/ui/manual_non_exhaustive_struct.stderr b/tests/ui/manual_non_exhaustive_struct.stderr index e0766c17b758..d0bed8e11211 100644 --- a/tests/ui/manual_non_exhaustive_struct.stderr +++ b/tests/ui/manual_non_exhaustive_struct.stderr @@ -12,12 +12,12 @@ LL | | _c: (), LL | | } | |_____^ | - = note: `-D clippy::manual-non-exhaustive` implied by `-D warnings` help: remove this field --> $DIR/manual_non_exhaustive_struct.rs:8:9 | LL | _c: (), | ^^^^^^ + = note: `-D clippy::manual-non-exhaustive` implied by `-D warnings` error: this seems like a manual implementation of the non-exhaustive pattern --> $DIR/manual_non_exhaustive_struct.rs:13:5 diff --git a/tests/ui/manual_strip.stderr b/tests/ui/manual_strip.stderr index 896edf2ae516..2191ccb85dd5 100644 --- a/tests/ui/manual_strip.stderr +++ b/tests/ui/manual_strip.stderr @@ -4,12 +4,12 @@ error: stripping a prefix manually LL | str::to_string(&s["ab".len()..]); | ^^^^^^^^^^^^^^^^ | - = note: `-D clippy::manual-strip` implied by `-D warnings` note: the prefix was tested here --> $DIR/manual_strip.rs:6:5 | LL | if s.starts_with("ab") { | ^^^^^^^^^^^^^^^^^^^^^^^ + = note: `-D clippy::manual-strip` implied by `-D warnings` help: try using the `strip_prefix` method | LL ~ if let Some() = s.strip_prefix("ab") { diff --git a/tests/ui/map_err.stderr b/tests/ui/map_err.stderr index c035840521e4..d44403a84a56 100644 --- a/tests/ui/map_err.stderr +++ b/tests/ui/map_err.stderr @@ -4,8 +4,8 @@ error: `map_err(|_|...` wildcard pattern discards the original error LL | println!("{:?}", x.map_err(|_| Errors::Ignored)); | ^^^ | - = note: `-D clippy::map-err-ignore` implied by `-D warnings` = help: consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`) + = note: `-D clippy::map-err-ignore` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/match_overlapping_arm.stderr b/tests/ui/match_overlapping_arm.stderr index b81bb1ecfae0..a72becbeb669 100644 --- a/tests/ui/match_overlapping_arm.stderr +++ b/tests/ui/match_overlapping_arm.stderr @@ -4,12 +4,12 @@ error: some ranges overlap LL | 0..=10 => println!("0..=10"), | ^^^^^^ | - = note: `-D clippy::match-overlapping-arm` implied by `-D warnings` note: overlaps with this --> $DIR/match_overlapping_arm.rs:14:9 | LL | 0..=11 => println!("0..=11"), | ^^^^^^ + = note: `-D clippy::match-overlapping-arm` implied by `-D warnings` error: some ranges overlap --> $DIR/match_overlapping_arm.rs:19:9 diff --git a/tests/ui/match_same_arms.stderr b/tests/ui/match_same_arms.stderr index b6d04263b37a..db85b5964e84 100644 --- a/tests/ui/match_same_arms.stderr +++ b/tests/ui/match_same_arms.stderr @@ -4,13 +4,13 @@ error: this match arm has an identical body to the `_` wildcard arm LL | Abc::A => 0, | ^^^^^^^^^^^ help: try removing the arm | - = note: `-D clippy::match-same-arms` implied by `-D warnings` = help: or try changing either arm body note: `_` wildcard arm here --> $DIR/match_same_arms.rs:13:9 | LL | _ => 0, //~ ERROR match arms have same body | ^^^^^^ + = note: `-D clippy::match-same-arms` implied by `-D warnings` error: this match arm has an identical body to another arm --> $DIR/match_same_arms.rs:17:9 diff --git a/tests/ui/match_same_arms2.stderr b/tests/ui/match_same_arms2.stderr index 14a672ba2fec..b260155d2189 100644 --- a/tests/ui/match_same_arms2.stderr +++ b/tests/ui/match_same_arms2.stderr @@ -10,7 +10,6 @@ LL | | a LL | | }, | |_________^ help: try removing the arm | - = note: `-D clippy::match-same-arms` implied by `-D warnings` = help: or try changing either arm body note: `_` wildcard arm here --> $DIR/match_same_arms2.rs:20:9 @@ -23,6 +22,7 @@ LL | | let mut a = 42 + [23].len() as i32; LL | | a LL | | }, | |_________^ + = note: `-D clippy::match-same-arms` implied by `-D warnings` error: this match arm has an identical body to another arm --> $DIR/match_same_arms2.rs:34:9 diff --git a/tests/ui/match_wild_err_arm.edition2018.stderr b/tests/ui/match_wild_err_arm.edition2018.stderr index 2d66daea8046..525533bf07bb 100644 --- a/tests/ui/match_wild_err_arm.edition2018.stderr +++ b/tests/ui/match_wild_err_arm.edition2018.stderr @@ -4,8 +4,8 @@ error: `Err(_)` matches all errors LL | Err(_) => panic!("err"), | ^^^^^^ | - = note: `-D clippy::match-wild-err-arm` implied by `-D warnings` = note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable + = note: `-D clippy::match-wild-err-arm` implied by `-D warnings` error: `Err(_)` matches all errors --> $DIR/match_wild_err_arm.rs:20:9 diff --git a/tests/ui/match_wild_err_arm.edition2021.stderr b/tests/ui/match_wild_err_arm.edition2021.stderr index 2d66daea8046..525533bf07bb 100644 --- a/tests/ui/match_wild_err_arm.edition2021.stderr +++ b/tests/ui/match_wild_err_arm.edition2021.stderr @@ -4,8 +4,8 @@ error: `Err(_)` matches all errors LL | Err(_) => panic!("err"), | ^^^^^^ | - = note: `-D clippy::match-wild-err-arm` implied by `-D warnings` = note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable + = note: `-D clippy::match-wild-err-arm` implied by `-D warnings` error: `Err(_)` matches all errors --> $DIR/match_wild_err_arm.rs:20:9 diff --git a/tests/ui/min_rust_version_attr.stderr b/tests/ui/min_rust_version_attr.stderr index b1c23b539ffd..6e749d2741c4 100644 --- a/tests/ui/min_rust_version_attr.stderr +++ b/tests/ui/min_rust_version_attr.stderr @@ -4,12 +4,12 @@ error: stripping a prefix manually LL | assert_eq!(s["hello, ".len()..].to_uppercase(), "WORLD!"); | ^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::manual-strip` implied by `-D warnings` note: the prefix was tested here --> $DIR/min_rust_version_attr.rs:203:9 | LL | if s.starts_with("hello, ") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: `-D clippy::manual-strip` implied by `-D warnings` help: try using the `strip_prefix` method | LL ~ if let Some() = s.strip_prefix("hello, ") { diff --git a/tests/ui/mismatched_target_os_unix.stderr b/tests/ui/mismatched_target_os_unix.stderr index 3534b53282f9..9822c77c9dfe 100644 --- a/tests/ui/mismatched_target_os_unix.stderr +++ b/tests/ui/mismatched_target_os_unix.stderr @@ -6,8 +6,8 @@ LL | #[cfg(linux)] | | | help: try: `target_os = "linux"` | - = note: `-D clippy::mismatched-target-os` implied by `-D warnings` = help: did you mean `unix`? + = note: `-D clippy::mismatched-target-os` implied by `-D warnings` error: operating system used in target family position --> $DIR/mismatched_target_os_unix.rs:9:1 diff --git a/tests/ui/mismatching_type_param_order.stderr b/tests/ui/mismatching_type_param_order.stderr index cb720256c50e..204d49905577 100644 --- a/tests/ui/mismatching_type_param_order.stderr +++ b/tests/ui/mismatching_type_param_order.stderr @@ -4,8 +4,8 @@ error: `Foo` has a similarly named generic type parameter `B` in its declaration LL | impl Foo {} | ^ | - = note: `-D clippy::mismatching-type-param-order` implied by `-D warnings` = help: try `A`, or a name that does not conflict with `Foo`'s generic params + = note: `-D clippy::mismatching-type-param-order` implied by `-D warnings` error: `Foo` has a similarly named generic type parameter `A` in its declaration, but in a different order --> $DIR/mismatching_type_param_order.rs:11:23 diff --git a/tests/ui/missing_panics_doc.stderr b/tests/ui/missing_panics_doc.stderr index 91ebd695238b..c9ded7f1ad03 100644 --- a/tests/ui/missing_panics_doc.stderr +++ b/tests/ui/missing_panics_doc.stderr @@ -7,12 +7,12 @@ LL | | result.unwrap() LL | | } | |_^ | - = note: `-D clippy::missing-panics-doc` implied by `-D warnings` note: first possible panic found here --> $DIR/missing_panics_doc.rs:8:5 | LL | result.unwrap() | ^^^^^^^^^^^^^^^ + = note: `-D clippy::missing-panics-doc` implied by `-D warnings` error: docs for function which may panic missing `# Panics` section --> $DIR/missing_panics_doc.rs:12:1 diff --git a/tests/ui/mixed_read_write_in_expression.stderr b/tests/ui/mixed_read_write_in_expression.stderr index 2e951cdbcbfd..8cc68b0ac7b4 100644 --- a/tests/ui/mixed_read_write_in_expression.stderr +++ b/tests/ui/mixed_read_write_in_expression.stderr @@ -4,12 +4,12 @@ error: unsequenced read of `x` LL | } + x; | ^ | - = note: `-D clippy::mixed-read-write-in-expression` implied by `-D warnings` note: whether read occurs before this write depends on evaluation order --> $DIR/mixed_read_write_in_expression.rs:12:9 | LL | x = 1; | ^^^^^ + = note: `-D clippy::mixed-read-write-in-expression` implied by `-D warnings` error: unsequenced read of `x` --> $DIR/mixed_read_write_in_expression.rs:17:5 diff --git a/tests/ui/modulo_arithmetic_float.stderr b/tests/ui/modulo_arithmetic_float.stderr index 97844aaaa759..36106de31f0b 100644 --- a/tests/ui/modulo_arithmetic_float.stderr +++ b/tests/ui/modulo_arithmetic_float.stderr @@ -4,8 +4,8 @@ error: you are using modulo operator on constants with different signs: `-1.600 LL | -1.6 % 2.1; | ^^^^^^^^^^ | - = note: `-D clippy::modulo-arithmetic` implied by `-D warnings` = note: double check for expected result especially when interoperating with different languages + = note: `-D clippy::modulo-arithmetic` implied by `-D warnings` error: you are using modulo operator on constants with different signs: `1.600 % -2.100` --> $DIR/modulo_arithmetic_float.rs:7:5 diff --git a/tests/ui/modulo_arithmetic_integral.stderr b/tests/ui/modulo_arithmetic_integral.stderr index f71adf5b0d01..9ff676ff6bcb 100644 --- a/tests/ui/modulo_arithmetic_integral.stderr +++ b/tests/ui/modulo_arithmetic_integral.stderr @@ -4,9 +4,9 @@ error: you are using modulo operator on types that might have different signs LL | a % b; | ^^^^^ | - = note: `-D clippy::modulo-arithmetic` implied by `-D warnings` = note: double check for expected result especially when interoperating with different languages = note: or consider using `rem_euclid` or similar function + = note: `-D clippy::modulo-arithmetic` implied by `-D warnings` error: you are using modulo operator on types that might have different signs --> $DIR/modulo_arithmetic_integral.rs:9:5 diff --git a/tests/ui/modulo_arithmetic_integral_const.stderr b/tests/ui/modulo_arithmetic_integral_const.stderr index 11b5f77461ba..1453d44f488f 100644 --- a/tests/ui/modulo_arithmetic_integral_const.stderr +++ b/tests/ui/modulo_arithmetic_integral_const.stderr @@ -4,9 +4,9 @@ error: you are using modulo operator on constants with different signs: `-1 % 2` LL | -1 % 2; | ^^^^^^ | - = note: `-D clippy::modulo-arithmetic` implied by `-D warnings` = note: double check for expected result especially when interoperating with different languages = note: or consider using `rem_euclid` or similar function + = note: `-D clippy::modulo-arithmetic` implied by `-D warnings` error: you are using modulo operator on constants with different signs: `1 % -2` --> $DIR/modulo_arithmetic_integral_const.rs:12:5 diff --git a/tests/ui/mut_from_ref.stderr b/tests/ui/mut_from_ref.stderr index b76d6a13ffb9..c20ff54bf949 100644 --- a/tests/ui/mut_from_ref.stderr +++ b/tests/ui/mut_from_ref.stderr @@ -4,12 +4,12 @@ error: mutable borrow from immutable input(s) LL | fn this_wont_hurt_a_bit(&self) -> &mut Foo { | ^^^^^^^^ | - = note: `-D clippy::mut-from-ref` implied by `-D warnings` note: immutable borrow here --> $DIR/mut_from_ref.rs:7:29 | LL | fn this_wont_hurt_a_bit(&self) -> &mut Foo { | ^^^^^ + = note: `-D clippy::mut-from-ref` implied by `-D warnings` error: mutable borrow from immutable input(s) --> $DIR/mut_from_ref.rs:13:25 diff --git a/tests/ui/mut_range_bound.stderr b/tests/ui/mut_range_bound.stderr index 4b5a3fc1e418..e0c8dced382e 100644 --- a/tests/ui/mut_range_bound.stderr +++ b/tests/ui/mut_range_bound.stderr @@ -4,8 +4,8 @@ error: attempt to mutate range bound within loop LL | m = 5; | ^ | - = note: `-D clippy::mut-range-bound` implied by `-D warnings` = note: the range of the loop is unchanged + = note: `-D clippy::mut-range-bound` implied by `-D warnings` error: attempt to mutate range bound within loop --> $DIR/mut_range_bound.rs:15:9 diff --git a/tests/ui/needless_continue.stderr b/tests/ui/needless_continue.stderr index b8657c74caa6..005ba010f34f 100644 --- a/tests/ui/needless_continue.stderr +++ b/tests/ui/needless_continue.stderr @@ -7,7 +7,6 @@ LL | | continue; LL | | } | |_________^ | - = note: `-D clippy::needless-continue` implied by `-D warnings` = help: consider dropping the `else` clause and merging the code that follows (in the loop) with the `if` block if i % 2 == 0 && i % 3 == 0 { println!("{}", i); @@ -33,6 +32,7 @@ LL | | } } println!("bleh"); } + = note: `-D clippy::needless-continue` implied by `-D warnings` error: there is no need for an explicit `else` block for this `if` expression --> $DIR/needless_continue.rs:44:9 diff --git a/tests/ui/non_send_fields_in_send_ty.stderr b/tests/ui/non_send_fields_in_send_ty.stderr index b6c904a147a5..e912b59a6e7b 100644 --- a/tests/ui/non_send_fields_in_send_ty.stderr +++ b/tests/ui/non_send_fields_in_send_ty.stderr @@ -4,13 +4,13 @@ error: some fields in `RingBuffer` are not safe to be sent to another thread LL | unsafe impl Send for RingBuffer {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings` note: it is not safe to send field `data` to another thread --> $DIR/non_send_fields_in_send_ty.rs:12:5 | LL | data: Vec>, | ^^^^^^^^^^^^^^^^^^^^^^^^ = help: add bounds on type parameter `T` that satisfy `Vec>: Send` + = note: `-D clippy::non-send-fields-in-send-ty` implied by `-D warnings` error: some fields in `MvccRwLock` are not safe to be sent to another thread --> $DIR/non_send_fields_in_send_ty.rs:25:1 diff --git a/tests/ui/octal_escapes.stderr b/tests/ui/octal_escapes.stderr index 54f5bbb0fc43..295dc1798e36 100644 --- a/tests/ui/octal_escapes.stderr +++ b/tests/ui/octal_escapes.stderr @@ -4,8 +4,8 @@ error: octal-looking escape in string literal LL | let _bad1 = "/033[0m"; | ^^^^^^^^^ | - = note: `-D clippy::octal-escapes` implied by `-D warnings` = help: octal escapes are not supported, `/0` is always a null character + = note: `-D clippy::octal-escapes` implied by `-D warnings` help: if an octal escape was intended, use the hexadecimal representation instead | LL | let _bad1 = "/x1b[0m"; diff --git a/tests/ui/ok_expect.stderr b/tests/ui/ok_expect.stderr index b02b28e7f68c..6c40adbb53dc 100644 --- a/tests/ui/ok_expect.stderr +++ b/tests/ui/ok_expect.stderr @@ -4,8 +4,8 @@ error: called `ok().expect()` on a `Result` value LL | res.ok().expect("disaster!"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::ok-expect` implied by `-D warnings` = help: you can call `expect()` directly on the `Result` + = note: `-D clippy::ok-expect` implied by `-D warnings` error: called `ok().expect()` on a `Result` value --> $DIR/ok_expect.rs:20:5 diff --git a/tests/ui/only_used_in_recursion.stderr b/tests/ui/only_used_in_recursion.stderr index 74057ddcfda4..571e5c4b5faa 100644 --- a/tests/ui/only_used_in_recursion.stderr +++ b/tests/ui/only_used_in_recursion.stderr @@ -4,12 +4,12 @@ error: parameter is only used in recursion LL | fn _one_unused(flag: u32, a: usize) -> usize { | ^ help: if this is intentional, prefix it with an underscore: `_a` | - = note: `-D clippy::only-used-in-recursion` implied by `-D warnings` note: parameter used here --> $DIR/only_used_in_recursion.rs:12:53 | LL | if flag == 0 { 0 } else { _one_unused(flag - 1, a) } | ^ + = note: `-D clippy::only-used-in-recursion` implied by `-D warnings` error: parameter is only used in recursion --> $DIR/only_used_in_recursion.rs:15:27 diff --git a/tests/ui/only_used_in_recursion2.stderr b/tests/ui/only_used_in_recursion2.stderr index 23f6ffd30c97..8dcbfdd612ef 100644 --- a/tests/ui/only_used_in_recursion2.stderr +++ b/tests/ui/only_used_in_recursion2.stderr @@ -4,12 +4,12 @@ error: parameter is only used in recursion LL | fn _with_inner(flag: u32, a: u32, b: u32) -> usize { | ^ help: if this is intentional, prefix it with an underscore: `_b` | - = note: `-D clippy::only-used-in-recursion` implied by `-D warnings` note: parameter used here --> $DIR/only_used_in_recursion2.rs:9:52 | LL | if flag == 0 { 0 } else { _with_inner(flag, a, b + x) } | ^ + = note: `-D clippy::only-used-in-recursion` implied by `-D warnings` error: parameter is only used in recursion --> $DIR/only_used_in_recursion2.rs:4:25 diff --git a/tests/ui/option_env_unwrap.stderr b/tests/ui/option_env_unwrap.stderr index 885ac096cc8f..bc188a07e9e0 100644 --- a/tests/ui/option_env_unwrap.stderr +++ b/tests/ui/option_env_unwrap.stderr @@ -4,8 +4,8 @@ error: this will panic at run-time if the environment variable doesn't exist at LL | let _ = option_env!("PATH").unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::option-env-unwrap` implied by `-D warnings` = help: consider using the `env!` macro instead + = note: `-D clippy::option-env-unwrap` implied by `-D warnings` error: this will panic at run-time if the environment variable doesn't exist at compile-time --> $DIR/option_env_unwrap.rs:19:13 diff --git a/tests/ui/overly_complex_bool_expr.stderr b/tests/ui/overly_complex_bool_expr.stderr index 158cae8b8f37..e989f2ece308 100644 --- a/tests/ui/overly_complex_bool_expr.stderr +++ b/tests/ui/overly_complex_bool_expr.stderr @@ -4,12 +4,12 @@ error: this boolean expression contains a logic bug LL | let _ = a && b || a; | ^^^^^^^^^^^ help: it would look like the following: `a` | - = note: `-D clippy::overly-complex-bool-expr` implied by `-D warnings` help: this expression can be optimized out by applying boolean operations to the outer expression --> $DIR/overly_complex_bool_expr.rs:11:18 | LL | let _ = a && b || a; | ^ + = note: `-D clippy::overly-complex-bool-expr` implied by `-D warnings` error: this boolean expression contains a logic bug --> $DIR/overly_complex_bool_expr.rs:13:13 diff --git a/tests/ui/panic_in_result_fn.stderr b/tests/ui/panic_in_result_fn.stderr index 561503ae54fa..97787bc84e2c 100644 --- a/tests/ui/panic_in_result_fn.stderr +++ b/tests/ui/panic_in_result_fn.stderr @@ -7,13 +7,13 @@ LL | | panic!("error"); LL | | } | |_____^ | - = note: `-D clippy::panic-in-result-fn` implied by `-D warnings` = help: `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertions should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing note: return Err() instead of panicking --> $DIR/panic_in_result_fn.rs:8:9 | LL | panic!("error"); | ^^^^^^^^^^^^^^^ + = note: `-D clippy::panic-in-result-fn` implied by `-D warnings` error: used `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertion in a function that returns `Result` --> $DIR/panic_in_result_fn.rs:11:5 diff --git a/tests/ui/panic_in_result_fn_assertions.stderr b/tests/ui/panic_in_result_fn_assertions.stderr index b6aa005e7b52..eb0aacbb6a44 100644 --- a/tests/ui/panic_in_result_fn_assertions.stderr +++ b/tests/ui/panic_in_result_fn_assertions.stderr @@ -8,13 +8,13 @@ LL | | Ok(true) LL | | } | |_____^ | - = note: `-D clippy::panic-in-result-fn` implied by `-D warnings` = help: `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertions should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing note: return Err() instead of panicking --> $DIR/panic_in_result_fn_assertions.rs:9:9 | LL | assert!(x == 5, "wrong argument"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: `-D clippy::panic-in-result-fn` implied by `-D warnings` error: used `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertion in a function that returns `Result` --> $DIR/panic_in_result_fn_assertions.rs:13:5 diff --git a/tests/ui/pattern_type_mismatch/mutability.stderr b/tests/ui/pattern_type_mismatch/mutability.stderr index 3421d568365c..87fb243b65ef 100644 --- a/tests/ui/pattern_type_mismatch/mutability.stderr +++ b/tests/ui/pattern_type_mismatch/mutability.stderr @@ -4,8 +4,8 @@ error: type of pattern does not match the expression type LL | Some(_) => (), | ^^^^^^^ | - = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings` = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings + = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings` error: type of pattern does not match the expression type --> $DIR/mutability.rs:15:9 diff --git a/tests/ui/pattern_type_mismatch/pattern_alternatives.stderr b/tests/ui/pattern_type_mismatch/pattern_alternatives.stderr index d285c93782c6..a91b5ac6cf74 100644 --- a/tests/ui/pattern_type_mismatch/pattern_alternatives.stderr +++ b/tests/ui/pattern_type_mismatch/pattern_alternatives.stderr @@ -4,8 +4,8 @@ error: type of pattern does not match the expression type LL | if let Value::B | Value::A(_) = ref_value {} | ^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings` = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings + = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings` error: type of pattern does not match the expression type --> $DIR/pattern_alternatives.rs:16:34 diff --git a/tests/ui/pattern_type_mismatch/pattern_structs.stderr b/tests/ui/pattern_type_mismatch/pattern_structs.stderr index d428e85b0c91..8bc5c63baab5 100644 --- a/tests/ui/pattern_type_mismatch/pattern_structs.stderr +++ b/tests/ui/pattern_type_mismatch/pattern_structs.stderr @@ -4,8 +4,8 @@ error: type of pattern does not match the expression type LL | let Struct { .. } = ref_value; | ^^^^^^^^^^^^^ | - = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings` = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings + = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings` error: type of pattern does not match the expression type --> $DIR/pattern_structs.rs:14:33 diff --git a/tests/ui/pattern_type_mismatch/pattern_tuples.stderr b/tests/ui/pattern_type_mismatch/pattern_tuples.stderr index edd0074d00d3..a1ef540d2831 100644 --- a/tests/ui/pattern_type_mismatch/pattern_tuples.stderr +++ b/tests/ui/pattern_type_mismatch/pattern_tuples.stderr @@ -4,8 +4,8 @@ error: type of pattern does not match the expression type LL | let TupleStruct(_) = ref_value; | ^^^^^^^^^^^^^^ | - = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings` = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings + = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings` error: type of pattern does not match the expression type --> $DIR/pattern_tuples.rs:12:25 diff --git a/tests/ui/pattern_type_mismatch/syntax.stderr b/tests/ui/pattern_type_mismatch/syntax.stderr index 12b3d3a8bd07..f56a3a893801 100644 --- a/tests/ui/pattern_type_mismatch/syntax.stderr +++ b/tests/ui/pattern_type_mismatch/syntax.stderr @@ -4,8 +4,8 @@ error: type of pattern does not match the expression type LL | Some(_) => (), | ^^^^^^^ | - = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings` = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings + = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings` error: type of pattern does not match the expression type --> $DIR/syntax.rs:30:12 diff --git a/tests/ui/proc_macro.stderr b/tests/ui/proc_macro.stderr index 48fd58c9a493..c795f6ad0d25 100644 --- a/tests/ui/proc_macro.stderr +++ b/tests/ui/proc_macro.stderr @@ -4,8 +4,8 @@ error: approximate value of `f{32, 64}::consts::PI` found LL | let _x = 3.14; | ^^^^ | - = note: `#[deny(clippy::approx_constant)]` on by default = help: consider using the constant directly + = note: `#[deny(clippy::approx_constant)]` on by default error: aborting due to previous error diff --git a/tests/ui/pub_use.stderr b/tests/ui/pub_use.stderr index 9ab710df818c..ba4ee732c05c 100644 --- a/tests/ui/pub_use.stderr +++ b/tests/ui/pub_use.stderr @@ -4,8 +4,8 @@ error: using `pub use` LL | pub use inner::Test; | ^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::pub-use` implied by `-D warnings` = help: move the exported item to a public module instead + = note: `-D clippy::pub-use` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/rc_clone_in_vec_init/arc.stderr b/tests/ui/rc_clone_in_vec_init/arc.stderr index cd7d91e12065..7814f5b54036 100644 --- a/tests/ui/rc_clone_in_vec_init/arc.stderr +++ b/tests/ui/rc_clone_in_vec_init/arc.stderr @@ -4,8 +4,8 @@ error: initializing a reference-counted pointer in `vec![elem; len]` LL | let v = vec![Arc::new("x".to_string()); 2]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::rc-clone-in-vec-init` implied by `-D warnings` = note: each element will point to the same `Arc` instance + = note: `-D clippy::rc-clone-in-vec-init` implied by `-D warnings` help: consider initializing each `Arc` element individually | LL ~ let v = { diff --git a/tests/ui/rc_clone_in_vec_init/rc.stderr b/tests/ui/rc_clone_in_vec_init/rc.stderr index fe861afe0549..80deb7cb9f24 100644 --- a/tests/ui/rc_clone_in_vec_init/rc.stderr +++ b/tests/ui/rc_clone_in_vec_init/rc.stderr @@ -4,8 +4,8 @@ error: initializing a reference-counted pointer in `vec![elem; len]` LL | let v = vec![Rc::new("x".to_string()); 2]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::rc-clone-in-vec-init` implied by `-D warnings` = note: each element will point to the same `Rc` instance + = note: `-D clippy::rc-clone-in-vec-init` implied by `-D warnings` help: consider initializing each `Rc` element individually | LL ~ let v = { diff --git a/tests/ui/rc_clone_in_vec_init/weak.stderr b/tests/ui/rc_clone_in_vec_init/weak.stderr index 4a21946ccdfa..789e14a302f6 100644 --- a/tests/ui/rc_clone_in_vec_init/weak.stderr +++ b/tests/ui/rc_clone_in_vec_init/weak.stderr @@ -4,8 +4,8 @@ error: initializing a reference-counted pointer in `vec![elem; len]` LL | let v = vec![SyncWeak::::new(); 2]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::rc-clone-in-vec-init` implied by `-D warnings` = note: each element will point to the same `Weak` instance + = note: `-D clippy::rc-clone-in-vec-init` implied by `-D warnings` help: consider initializing each `Weak` element individually | LL ~ let v = { diff --git a/tests/ui/rc_mutex.stderr b/tests/ui/rc_mutex.stderr index fe84361d7816..cee3bd8b224d 100644 --- a/tests/ui/rc_mutex.stderr +++ b/tests/ui/rc_mutex.stderr @@ -4,8 +4,8 @@ error: usage of `Rc>` LL | foo: Rc>, | ^^^^^^^^^^^^^^ | - = note: `-D clippy::rc-mutex` implied by `-D warnings` = help: consider using `Rc>` or `Arc>` instead + = note: `-D clippy::rc-mutex` implied by `-D warnings` error: usage of `Rc>` --> $DIR/rc_mutex.rs:26:18 diff --git a/tests/ui/redundant_allocation.stderr b/tests/ui/redundant_allocation.stderr index 54d4d88dba81..e0826fefa6cf 100644 --- a/tests/ui/redundant_allocation.stderr +++ b/tests/ui/redundant_allocation.stderr @@ -4,9 +4,9 @@ error: usage of `Box>` LL | pub fn box_test6(foo: Box>) {} | ^^^^^^^^^^ | - = note: `-D clippy::redundant-allocation` implied by `-D warnings` = note: `Rc` is already on the heap, `Box>` makes an extra allocation = help: consider using just `Box` or `Rc` + = note: `-D clippy::redundant-allocation` implied by `-D warnings` error: usage of `Box>` --> $DIR/redundant_allocation.rs:19:30 diff --git a/tests/ui/redundant_allocation_fixable.stderr b/tests/ui/redundant_allocation_fixable.stderr index fdd76ef17a55..8dd4a6a26874 100644 --- a/tests/ui/redundant_allocation_fixable.stderr +++ b/tests/ui/redundant_allocation_fixable.stderr @@ -4,8 +4,8 @@ error: usage of `Box<&T>` LL | pub fn box_test1(foo: Box<&T>) {} | ^^^^^^^ help: try: `&T` | - = note: `-D clippy::redundant-allocation` implied by `-D warnings` = note: `&T` is already a pointer, `Box<&T>` allocates a pointer on the heap + = note: `-D clippy::redundant-allocation` implied by `-D warnings` error: usage of `Box<&MyStruct>` --> $DIR/redundant_allocation_fixable.rs:28:27 diff --git a/tests/ui/redundant_clone.stderr b/tests/ui/redundant_clone.stderr index aa1dd7cbb45c..782590034d05 100644 --- a/tests/ui/redundant_clone.stderr +++ b/tests/ui/redundant_clone.stderr @@ -4,12 +4,12 @@ error: redundant clone LL | let _s = ["lorem", "ipsum"].join(" ").to_string(); | ^^^^^^^^^^^^ help: remove this | - = note: `-D clippy::redundant-clone` implied by `-D warnings` note: this value is dropped without further use --> $DIR/redundant_clone.rs:10:14 | LL | let _s = ["lorem", "ipsum"].join(" ").to_string(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: `-D clippy::redundant-clone` implied by `-D warnings` error: redundant clone --> $DIR/redundant_clone.rs:13:15 diff --git a/tests/ui/redundant_else.stderr b/tests/ui/redundant_else.stderr index 9000cdc814b1..de9d00a60246 100644 --- a/tests/ui/redundant_else.stderr +++ b/tests/ui/redundant_else.stderr @@ -7,8 +7,8 @@ LL | | println!("yet don't pull down your hedge."); LL | | } | |_________^ | - = note: `-D clippy::redundant-else` implied by `-D warnings` = help: remove the `else` block and move the contents out + = note: `-D clippy::redundant-else` implied by `-D warnings` error: redundant else block --> $DIR/redundant_else.rs:17:16 diff --git a/tests/ui/redundant_pattern_matching_drop_order.stderr b/tests/ui/redundant_pattern_matching_drop_order.stderr index eb7aa70ee273..23f08103f358 100644 --- a/tests/ui/redundant_pattern_matching_drop_order.stderr +++ b/tests/ui/redundant_pattern_matching_drop_order.stderr @@ -4,9 +4,9 @@ error: redundant pattern matching, consider using `is_ok()` LL | if let Ok(_) = m.lock() {} | -------^^^^^----------- help: try this: `if m.lock().is_ok()` | - = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings` = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important + = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings` error: redundant pattern matching, consider using `is_err()` --> $DIR/redundant_pattern_matching_drop_order.rs:13:12 diff --git a/tests/ui/regex.stderr b/tests/ui/regex.stderr index 1394a9b63bc6..2424644c6f6b 100644 --- a/tests/ui/regex.stderr +++ b/tests/ui/regex.stderr @@ -4,8 +4,8 @@ error: trivial regex LL | let pipe_in_wrong_position = Regex::new("|"); | ^^^ | - = note: `-D clippy::trivial-regex` implied by `-D warnings` = help: the regex is unlikely to be useful as it is + = note: `-D clippy::trivial-regex` implied by `-D warnings` error: trivial regex --> $DIR/regex.rs:14:60 diff --git a/tests/ui/rest_pat_in_fully_bound_structs.stderr b/tests/ui/rest_pat_in_fully_bound_structs.stderr index 57ebd47f8c7a..e15633fb1a13 100644 --- a/tests/ui/rest_pat_in_fully_bound_structs.stderr +++ b/tests/ui/rest_pat_in_fully_bound_structs.stderr @@ -4,8 +4,8 @@ error: unnecessary use of `..` pattern in struct binding. All fields were alread LL | A { a: 5, b: 42, c: "", .. } => {}, // Lint | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::rest-pat-in-fully-bound-structs` implied by `-D warnings` = help: consider removing `..` from this binding + = note: `-D clippy::rest-pat-in-fully-bound-structs` implied by `-D warnings` error: unnecessary use of `..` pattern in struct binding. All fields were already bound --> $DIR/rest_pat_in_fully_bound_structs.rs:23:9 diff --git a/tests/ui/result_large_err.stderr b/tests/ui/result_large_err.stderr index ef19f2854ab1..bea101fe20bf 100644 --- a/tests/ui/result_large_err.stderr +++ b/tests/ui/result_large_err.stderr @@ -4,8 +4,8 @@ error: the `Err`-variant returned from this function is very large LL | pub fn large_err() -> Result<(), [u8; 512]> { | ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 512 bytes | - = note: `-D clippy::result-large-err` implied by `-D warnings` = help: try reducing the size of `[u8; 512]`, for example by boxing large elements or replacing it with `Box<[u8; 512]>` + = note: `-D clippy::result-large-err` implied by `-D warnings` error: the `Err`-variant returned from this function is very large --> $DIR/result_large_err.rs:19:21 diff --git a/tests/ui/result_unit_error.stderr b/tests/ui/result_unit_error.stderr index 8c7573eabda9..8393a4bf03bc 100644 --- a/tests/ui/result_unit_error.stderr +++ b/tests/ui/result_unit_error.stderr @@ -4,8 +4,8 @@ error: this returns a `Result<_, ()>` LL | pub fn returns_unit_error() -> Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::result-unit-err` implied by `-D warnings` = help: use a custom `Error` type instead + = note: `-D clippy::result-unit-err` implied by `-D warnings` error: this returns a `Result<_, ()>` --> $DIR/result_unit_error.rs:12:5 diff --git a/tests/ui/return_self_not_must_use.stderr b/tests/ui/return_self_not_must_use.stderr index 94be87dfa31c..34932fe1c2c5 100644 --- a/tests/ui/return_self_not_must_use.stderr +++ b/tests/ui/return_self_not_must_use.stderr @@ -4,8 +4,8 @@ error: missing `#[must_use]` attribute on a method returning `Self` LL | fn what(&self) -> Self; | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::return-self-not-must-use` implied by `-D warnings` = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type + = note: `-D clippy::return-self-not-must-use` implied by `-D warnings` error: missing `#[must_use]` attribute on a method returning `Self` --> $DIR/return_self_not_must_use.rs:18:5 diff --git a/tests/ui/same_functions_in_if_condition.stderr b/tests/ui/same_functions_in_if_condition.stderr index cd438b830401..3901546cbd65 100644 --- a/tests/ui/same_functions_in_if_condition.stderr +++ b/tests/ui/same_functions_in_if_condition.stderr @@ -4,12 +4,12 @@ error: this `if` has the same function call as a previous `if` LL | } else if function() { | ^^^^^^^^^^ | - = note: `-D clippy::same-functions-in-if-condition` implied by `-D warnings` note: same as this --> $DIR/same_functions_in_if_condition.rs:30:8 | LL | if function() { | ^^^^^^^^^^ + = note: `-D clippy::same-functions-in-if-condition` implied by `-D warnings` error: this `if` has the same function call as a previous `if` --> $DIR/same_functions_in_if_condition.rs:36:15 diff --git a/tests/ui/same_item_push.stderr b/tests/ui/same_item_push.stderr index d9ffa15780ad..1d1254d9fcc6 100644 --- a/tests/ui/same_item_push.stderr +++ b/tests/ui/same_item_push.stderr @@ -4,8 +4,8 @@ error: it looks like the same item is being pushed into this Vec LL | vec.push(item); | ^^^ | - = note: `-D clippy::same-item-push` implied by `-D warnings` = help: try using vec![item;SIZE] or vec.resize(NEW_SIZE, item) + = note: `-D clippy::same-item-push` implied by `-D warnings` error: it looks like the same item is being pushed into this Vec --> $DIR/same_item_push.rs:29:9 diff --git a/tests/ui/same_name_method.stderr b/tests/ui/same_name_method.stderr index f55ec9f3cc66..0c6908c09593 100644 --- a/tests/ui/same_name_method.stderr +++ b/tests/ui/same_name_method.stderr @@ -4,12 +4,12 @@ error: method's name is the same as an existing method in a trait LL | fn foo() {} | ^^^^^^^^^^^ | - = note: `-D clippy::same-name-method` implied by `-D warnings` note: existing `foo` defined here --> $DIR/same_name_method.rs:25:13 | LL | fn foo() {} | ^^^^^^^^^^^ + = note: `-D clippy::same-name-method` implied by `-D warnings` error: method's name is the same as an existing method in a trait --> $DIR/same_name_method.rs:35:13 diff --git a/tests/ui/search_is_some.stderr b/tests/ui/search_is_some.stderr index 54760545bced..6bea8c674779 100644 --- a/tests/ui/search_is_some.stderr +++ b/tests/ui/search_is_some.stderr @@ -8,8 +8,8 @@ LL | | } LL | | ).is_some(); | |______________________________^ | - = note: `-D clippy::search-is-some` implied by `-D warnings` = help: this is more succinctly expressed by calling `any()` + = note: `-D clippy::search-is-some` implied by `-D warnings` error: called `is_some()` after searching an `Iterator` with `position` --> $DIR/search_is_some.rs:20:13 diff --git a/tests/ui/shadow.stderr b/tests/ui/shadow.stderr index 43d76094d0e8..c3d7bc2a5360 100644 --- a/tests/ui/shadow.stderr +++ b/tests/ui/shadow.stderr @@ -4,12 +4,12 @@ error: `x` is shadowed by itself in `x` LL | let x = x; | ^ | - = note: `-D clippy::shadow-same` implied by `-D warnings` note: previous binding is here --> $DIR/shadow.rs:5:9 | LL | let x = 1; | ^ + = note: `-D clippy::shadow-same` implied by `-D warnings` error: `mut x` is shadowed by itself in `&x` --> $DIR/shadow.rs:7:13 @@ -53,12 +53,12 @@ error: `x` is shadowed LL | let x = x.0; | ^ | - = note: `-D clippy::shadow-reuse` implied by `-D warnings` note: previous binding is here --> $DIR/shadow.rs:13:9 | LL | let x = ([[0]], ()); | ^ + = note: `-D clippy::shadow-reuse` implied by `-D warnings` error: `x` is shadowed --> $DIR/shadow.rs:15:9 @@ -150,12 +150,12 @@ error: `x` shadows a previous, unrelated binding LL | let x = 2; | ^ | - = note: `-D clippy::shadow-unrelated` implied by `-D warnings` note: previous binding is here --> $DIR/shadow.rs:30:9 | LL | let x = 1; | ^ + = note: `-D clippy::shadow-unrelated` implied by `-D warnings` error: `x` shadows a previous, unrelated binding --> $DIR/shadow.rs:36:13 diff --git a/tests/ui/should_impl_trait/method_list_1.stderr b/tests/ui/should_impl_trait/method_list_1.stderr index 2b7d4628c3fa..d2f41e3f934a 100644 --- a/tests/ui/should_impl_trait/method_list_1.stderr +++ b/tests/ui/should_impl_trait/method_list_1.stderr @@ -6,8 +6,8 @@ LL | | unimplemented!() LL | | } | |_____^ | - = note: `-D clippy::should-implement-trait` implied by `-D warnings` = help: consider implementing the trait `std::ops::Add` or choosing a less ambiguous method name + = note: `-D clippy::should-implement-trait` implied by `-D warnings` error: method `as_mut` can be confused for the standard trait method `std::convert::AsMut::as_mut` --> $DIR/method_list_1.rs:29:5 diff --git a/tests/ui/should_impl_trait/method_list_2.stderr b/tests/ui/should_impl_trait/method_list_2.stderr index b6fd43569569..10bfea68ff57 100644 --- a/tests/ui/should_impl_trait/method_list_2.stderr +++ b/tests/ui/should_impl_trait/method_list_2.stderr @@ -6,8 +6,8 @@ LL | | unimplemented!() LL | | } | |_____^ | - = note: `-D clippy::should-implement-trait` implied by `-D warnings` = help: consider implementing the trait `std::cmp::PartialEq` or choosing a less ambiguous method name + = note: `-D clippy::should-implement-trait` implied by `-D warnings` error: method `from_iter` can be confused for the standard trait method `std::iter::FromIterator::from_iter` --> $DIR/method_list_2.rs:30:5 diff --git a/tests/ui/significant_drop_in_scrutinee.stderr b/tests/ui/significant_drop_in_scrutinee.stderr index 88ea6bce25b6..f1ed808ba087 100644 --- a/tests/ui/significant_drop_in_scrutinee.stderr +++ b/tests/ui/significant_drop_in_scrutinee.stderr @@ -10,8 +10,8 @@ LL | mutex.lock().unwrap().bar(); LL | }; | - temporary lives until here | - = note: `-D clippy::significant-drop-in-scrutinee` implied by `-D warnings` = note: this might lead to deadlocks or other unexpected behavior + = note: `-D clippy::significant-drop-in-scrutinee` implied by `-D warnings` help: try moving the temporary above the match | LL ~ let value = mutex.lock().unwrap().foo(); diff --git a/tests/ui/similar_names.stderr b/tests/ui/similar_names.stderr index 6e7726938973..43c5cee4b457 100644 --- a/tests/ui/similar_names.stderr +++ b/tests/ui/similar_names.stderr @@ -4,12 +4,12 @@ error: binding's name is too similar to existing binding LL | let bpple: i32; | ^^^^^ | - = note: `-D clippy::similar-names` implied by `-D warnings` note: existing binding defined here --> $DIR/similar_names.rs:19:9 | LL | let apple: i32; | ^^^^^ + = note: `-D clippy::similar-names` implied by `-D warnings` error: binding's name is too similar to existing binding --> $DIR/similar_names.rs:23:9 diff --git a/tests/ui/single_char_lifetime_names.stderr b/tests/ui/single_char_lifetime_names.stderr index 1438b3999dba..bfe6d44b5898 100644 --- a/tests/ui/single_char_lifetime_names.stderr +++ b/tests/ui/single_char_lifetime_names.stderr @@ -4,8 +4,8 @@ error: single-character lifetime names are likely uninformative LL | struct DiagnosticCtx<'a, 'b> | ^^ | - = note: `-D clippy::single-char-lifetime-names` implied by `-D warnings` = help: use a more informative name + = note: `-D clippy::single-char-lifetime-names` implied by `-D warnings` error: single-character lifetime names are likely uninformative --> $DIR/single_char_lifetime_names.rs:5:26 diff --git a/tests/ui/single_component_path_imports_nested_first.stderr b/tests/ui/single_component_path_imports_nested_first.stderr index cf990be1b9ff..633546f6419a 100644 --- a/tests/ui/single_component_path_imports_nested_first.stderr +++ b/tests/ui/single_component_path_imports_nested_first.stderr @@ -4,8 +4,8 @@ error: this import is redundant LL | use {regex, serde}; | ^^^^^ | - = note: `-D clippy::single-component-path-imports` implied by `-D warnings` = help: remove this import + = note: `-D clippy::single-component-path-imports` implied by `-D warnings` error: this import is redundant --> $DIR/single_component_path_imports_nested_first.rs:13:17 diff --git a/tests/ui/size_of_in_element_count/expressions.stderr b/tests/ui/size_of_in_element_count/expressions.stderr index 0f0dff57f51b..037f695f3ee9 100644 --- a/tests/ui/size_of_in_element_count/expressions.stderr +++ b/tests/ui/size_of_in_element_count/expressions.stderr @@ -4,8 +4,8 @@ error: found a count of bytes instead of a count of elements of `T` LL | unsafe { copy_nonoverlapping(x.as_ptr(), y.as_mut_ptr(), size_of::() * SIZE) }; | ^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::size-of-in-element-count` implied by `-D warnings` = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type + = note: `-D clippy::size-of-in-element-count` implied by `-D warnings` error: found a count of bytes instead of a count of elements of `T` --> $DIR/expressions.rs:18:62 diff --git a/tests/ui/size_of_in_element_count/functions.stderr b/tests/ui/size_of_in_element_count/functions.stderr index c1e824167b7f..4351e6a14fe5 100644 --- a/tests/ui/size_of_in_element_count/functions.stderr +++ b/tests/ui/size_of_in_element_count/functions.stderr @@ -4,8 +4,8 @@ error: found a count of bytes instead of a count of elements of `T` LL | unsafe { copy_nonoverlapping::(x.as_ptr(), y.as_mut_ptr(), size_of::()) }; | ^^^^^^^^^^^^^^^ | - = note: `-D clippy::size-of-in-element-count` implied by `-D warnings` = help: use a count of elements instead of a count of bytes, it already gets multiplied by the size of the type + = note: `-D clippy::size-of-in-element-count` implied by `-D warnings` error: found a count of bytes instead of a count of elements of `T` --> $DIR/functions.rs:19:62 diff --git a/tests/ui/skip_while_next.stderr b/tests/ui/skip_while_next.stderr index 269cc13468bc..7308ab4e55c9 100644 --- a/tests/ui/skip_while_next.stderr +++ b/tests/ui/skip_while_next.stderr @@ -4,8 +4,8 @@ error: called `skip_while(

).next()` on an `Iterator` LL | let _ = v.iter().skip_while(|&x| *x < 0).next(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::skip-while-next` implied by `-D warnings` = help: this is more succinctly expressed by calling `.find(!

)` instead + = note: `-D clippy::skip-while-next` implied by `-D warnings` error: called `skip_while(

).next()` on an `Iterator` --> $DIR/skip_while_next.rs:17:13 diff --git a/tests/ui/stable_sort_primitive.stderr b/tests/ui/stable_sort_primitive.stderr index c35e0c22ae89..1432fdcff77a 100644 --- a/tests/ui/stable_sort_primitive.stderr +++ b/tests/ui/stable_sort_primitive.stderr @@ -4,8 +4,8 @@ error: used `sort` on primitive type `i32` LL | vec.sort(); | ^^^^^^^^^^ help: try: `vec.sort_unstable()` | - = note: `-D clippy::stable-sort-primitive` implied by `-D warnings` = note: an unstable sort typically performs faster without any observable difference for this data type + = note: `-D clippy::stable-sort-primitive` implied by `-D warnings` error: used `sort` on primitive type `bool` --> $DIR/stable_sort_primitive.rs:9:5 diff --git a/tests/ui/std_instead_of_core.stderr b/tests/ui/std_instead_of_core.stderr index bc49dabf5868..8138ccb82a00 100644 --- a/tests/ui/std_instead_of_core.stderr +++ b/tests/ui/std_instead_of_core.stderr @@ -4,8 +4,8 @@ error: used import from `std` instead of `core` LL | use std::hash::Hasher; | ^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::std-instead-of-core` implied by `-D warnings` = help: consider importing the item from `core` + = note: `-D clippy::std-instead-of-core` implied by `-D warnings` error: used import from `std` instead of `core` --> $DIR/std_instead_of_core.rs:11:9 @@ -69,8 +69,8 @@ error: used import from `std` instead of `alloc` LL | use std::vec; | ^^^^^^^^ | - = note: `-D clippy::std-instead-of-alloc` implied by `-D warnings` = help: consider importing the item from `alloc` + = note: `-D clippy::std-instead-of-alloc` implied by `-D warnings` error: used import from `std` instead of `alloc` --> $DIR/std_instead_of_core.rs:33:9 @@ -86,8 +86,8 @@ error: used import from `alloc` instead of `core` LL | use alloc::slice::from_ref; | ^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::alloc-instead-of-core` implied by `-D warnings` = help: consider importing the item from `core` + = note: `-D clippy::alloc-instead-of-core` implied by `-D warnings` error: aborting due to 11 previous errors diff --git a/tests/ui/str_to_string.stderr b/tests/ui/str_to_string.stderr index b1f73eda5d26..1d47da571fa1 100644 --- a/tests/ui/str_to_string.stderr +++ b/tests/ui/str_to_string.stderr @@ -4,8 +4,8 @@ error: `to_string()` called on a `&str` LL | let hello = "hello world".to_string(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::str-to-string` implied by `-D warnings` = help: consider using `.to_owned()` + = note: `-D clippy::str-to-string` implied by `-D warnings` error: `to_string()` called on a `&str` --> $DIR/str_to_string.rs:6:5 diff --git a/tests/ui/string_to_string.stderr b/tests/ui/string_to_string.stderr index 1ebd17999bd8..e304c3e346db 100644 --- a/tests/ui/string_to_string.stderr +++ b/tests/ui/string_to_string.stderr @@ -4,8 +4,8 @@ error: `to_string()` called on a `String` LL | let mut v = message.to_string(); | ^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::string-to-string` implied by `-D warnings` = help: consider using `.clone()` + = note: `-D clippy::string-to-string` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/struct_excessive_bools.stderr b/tests/ui/struct_excessive_bools.stderr index 2941bf2983aa..e4d50043acb0 100644 --- a/tests/ui/struct_excessive_bools.stderr +++ b/tests/ui/struct_excessive_bools.stderr @@ -9,8 +9,8 @@ LL | | d: bool, LL | | } | |_^ | - = note: `-D clippy::struct-excessive-bools` implied by `-D warnings` = help: consider using a state machine or refactoring bools into two-variant enums + = note: `-D clippy::struct-excessive-bools` implied by `-D warnings` error: more than 3 bools in a struct --> $DIR/struct_excessive_bools.rs:38:5 diff --git a/tests/ui/suspicious_else_formatting.stderr b/tests/ui/suspicious_else_formatting.stderr index ee68eb5a791c..2e512b47f123 100644 --- a/tests/ui/suspicious_else_formatting.stderr +++ b/tests/ui/suspicious_else_formatting.stderr @@ -4,8 +4,8 @@ error: this looks like an `else {..}` but the `else` is missing LL | } { | ^ | - = note: `-D clippy::suspicious-else-formatting` implied by `-D warnings` = note: to remove this lint, add the missing `else` or add a new line before the next block + = note: `-D clippy::suspicious-else-formatting` implied by `-D warnings` error: this looks like an `else if` but the `else` is missing --> $DIR/suspicious_else_formatting.rs:21:6 diff --git a/tests/ui/suspicious_map.stderr b/tests/ui/suspicious_map.stderr index 3ffcd1a90317..e251674819e4 100644 --- a/tests/ui/suspicious_map.stderr +++ b/tests/ui/suspicious_map.stderr @@ -4,8 +4,8 @@ error: this call to `map()` won't have an effect on the call to `count()` LL | let _ = (0..3).map(|x| x + 2).count(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::suspicious-map` implied by `-D warnings` = help: make sure you did not confuse `map` with `filter`, `for_each` or `inspect` + = note: `-D clippy::suspicious-map` implied by `-D warnings` error: this call to `map()` won't have an effect on the call to `count()` --> $DIR/suspicious_map.rs:7:13 diff --git a/tests/ui/suspicious_splitn.stderr b/tests/ui/suspicious_splitn.stderr index 3bcd681fa49d..55ce63d4faa8 100644 --- a/tests/ui/suspicious_splitn.stderr +++ b/tests/ui/suspicious_splitn.stderr @@ -4,8 +4,8 @@ error: `splitn` called with `0` splits LL | let _ = "a,b".splitn(0, ','); | ^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::suspicious-splitn` implied by `-D warnings` = note: the resulting iterator will always return `None` + = note: `-D clippy::suspicious-splitn` implied by `-D warnings` error: `rsplitn` called with `0` splits --> $DIR/suspicious_splitn.rs:11:13 diff --git a/tests/ui/suspicious_unary_op_formatting.stderr b/tests/ui/suspicious_unary_op_formatting.stderr index 581527dcff8e..9f1289ccba0c 100644 --- a/tests/ui/suspicious_unary_op_formatting.stderr +++ b/tests/ui/suspicious_unary_op_formatting.stderr @@ -4,8 +4,8 @@ error: by not having a space between `>` and `-` it looks like `>-` is a single LL | if a >- 30 {} | ^^^^ | - = note: `-D clippy::suspicious-unary-op-formatting` implied by `-D warnings` = help: put a space between `>` and `-` and remove the space after `-` + = note: `-D clippy::suspicious-unary-op-formatting` implied by `-D warnings` error: by not having a space between `>=` and `-` it looks like `>=-` is a single operator --> $DIR/suspicious_unary_op_formatting.rs:9:9 diff --git a/tests/ui/swap.stderr b/tests/ui/swap.stderr index 2b556b475cee..ee4b7a508a5e 100644 --- a/tests/ui/swap.stderr +++ b/tests/ui/swap.stderr @@ -6,8 +6,8 @@ LL | | bar.a = bar.b; LL | | bar.b = temp; | |________________^ help: try: `std::mem::swap(&mut bar.a, &mut bar.b)` | - = note: `-D clippy::manual-swap` implied by `-D warnings` = note: or maybe you should use `std::mem::replace`? + = note: `-D clippy::manual-swap` implied by `-D warnings` error: this looks like you are swapping elements of `foo` manually --> $DIR/swap.rs:36:5 @@ -96,8 +96,8 @@ LL | / a = b; LL | | b = a; | |_________^ help: try: `std::mem::swap(&mut a, &mut b)` | - = note: `-D clippy::almost-swapped` implied by `-D warnings` = note: or maybe you should use `std::mem::replace`? + = note: `-D clippy::almost-swapped` implied by `-D warnings` error: this looks like you are trying to swap `c.0` and `a` --> $DIR/swap.rs:140:5 diff --git a/tests/ui/trailing_empty_array.stderr b/tests/ui/trailing_empty_array.stderr index 9e2bd31d9fa5..2e1484400352 100644 --- a/tests/ui/trailing_empty_array.stderr +++ b/tests/ui/trailing_empty_array.stderr @@ -7,8 +7,8 @@ LL | | last: [usize; 0], LL | | } | |_^ | - = note: `-D clippy::trailing-empty-array` implied by `-D warnings` = help: consider annotating `RarelyUseful` with `#[repr(C)]` or another `repr` attribute + = note: `-D clippy::trailing-empty-array` implied by `-D warnings` error: trailing zero-sized array in a struct which is not marked with a `repr` attribute --> $DIR/trailing_empty_array.rs:10:1 diff --git a/tests/ui/trait_duplication_in_bounds_unfixable.stderr b/tests/ui/trait_duplication_in_bounds_unfixable.stderr index fbd9abb005f1..4d56a94646cb 100644 --- a/tests/ui/trait_duplication_in_bounds_unfixable.stderr +++ b/tests/ui/trait_duplication_in_bounds_unfixable.stderr @@ -4,12 +4,12 @@ error: this trait bound is already specified in the where clause LL | fn bad_foo(arg0: T, arg1: Z) | ^^^^^ | + = help: consider removing this trait bound note: the lint level is defined here --> $DIR/trait_duplication_in_bounds_unfixable.rs:1:9 | LL | #![deny(clippy::trait_duplication_in_bounds)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: consider removing this trait bound error: this trait bound is already specified in the where clause --> $DIR/trait_duplication_in_bounds_unfixable.rs:6:23 diff --git a/tests/ui/type_repetition_in_bounds.stderr b/tests/ui/type_repetition_in_bounds.stderr index 1d88714814d4..70d700c1cc46 100644 --- a/tests/ui/type_repetition_in_bounds.stderr +++ b/tests/ui/type_repetition_in_bounds.stderr @@ -4,12 +4,12 @@ error: this type has already been used as a bound predicate LL | T: Clone, | ^^^^^^^^ | + = help: consider combining the bounds: `T: Copy + Clone` note: the lint level is defined here --> $DIR/type_repetition_in_bounds.rs:1:9 | LL | #![deny(clippy::type_repetition_in_bounds)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: consider combining the bounds: `T: Copy + Clone` error: this type has already been used as a bound predicate --> $DIR/type_repetition_in_bounds.rs:25:5 diff --git a/tests/ui/undocumented_unsafe_blocks.stderr b/tests/ui/undocumented_unsafe_blocks.stderr index c6a2127443be..2c466ff5c733 100644 --- a/tests/ui/undocumented_unsafe_blocks.stderr +++ b/tests/ui/undocumented_unsafe_blocks.stderr @@ -4,8 +4,8 @@ error: unsafe block missing a safety comment LL | /* Safety: */ unsafe {} | ^^^^^^^^^ | - = note: `-D clippy::undocumented-unsafe-blocks` implied by `-D warnings` = help: consider adding a safety comment on the preceding line + = note: `-D clippy::undocumented-unsafe-blocks` implied by `-D warnings` error: unsafe block missing a safety comment --> $DIR/undocumented_unsafe_blocks.rs:266:5 diff --git a/tests/ui/undropped_manually_drops.stderr b/tests/ui/undropped_manually_drops.stderr index 2ac0fe98697e..92611a9b7df4 100644 --- a/tests/ui/undropped_manually_drops.stderr +++ b/tests/ui/undropped_manually_drops.stderr @@ -4,8 +4,8 @@ error: the inner value of this ManuallyDrop will not be dropped LL | drop(std::mem::ManuallyDrop::new(S)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::undropped-manually-drops` implied by `-D warnings` = help: to drop a `ManuallyDrop`, use std::mem::ManuallyDrop::drop + = note: `-D clippy::undropped-manually-drops` implied by `-D warnings` error: the inner value of this ManuallyDrop will not be dropped --> $DIR/undropped_manually_drops.rs:15:5 diff --git a/tests/ui/uninit_vec.stderr b/tests/ui/uninit_vec.stderr index 520bfb26b62e..77fc689f0763 100644 --- a/tests/ui/uninit_vec.stderr +++ b/tests/ui/uninit_vec.stderr @@ -7,8 +7,8 @@ LL | unsafe { LL | vec.set_len(200); | ^^^^^^^^^^^^^^^^ | - = note: `-D clippy::uninit-vec` implied by `-D warnings` = help: initialize the buffer or wrap the content in `MaybeUninit` + = note: `-D clippy::uninit-vec` implied by `-D warnings` error: calling `set_len()` immediately after reserving a buffer creates uninitialized values --> $DIR/uninit_vec.rs:18:5 diff --git a/tests/ui/unit_hash.stderr b/tests/ui/unit_hash.stderr index 050fa55a12be..089d1212dd17 100644 --- a/tests/ui/unit_hash.stderr +++ b/tests/ui/unit_hash.stderr @@ -4,8 +4,8 @@ error: this call to `hash` on the unit type will do nothing LL | Foo::Empty => ().hash(&mut state), | ^^^^^^^^^^^^^^^^^^^ help: remove the call to `hash` or consider using: `0_u8.hash(&mut state)` | - = note: `-D clippy::unit-hash` implied by `-D warnings` = note: the implementation of `Hash` for `()` is a no-op + = note: `-D clippy::unit-hash` implied by `-D warnings` error: this call to `hash` on the unit type will do nothing --> $DIR/unit_hash.rs:24:5 diff --git a/tests/ui/unit_return_expecting_ord.stderr b/tests/ui/unit_return_expecting_ord.stderr index e63d58746090..1d9564ce225e 100644 --- a/tests/ui/unit_return_expecting_ord.stderr +++ b/tests/ui/unit_return_expecting_ord.stderr @@ -4,12 +4,12 @@ error: this closure returns the unit type which also implements Ord LL | structs.sort_by_key(|s| { | ^^^ | - = note: `-D clippy::unit-return-expecting-ord` implied by `-D warnings` help: probably caused by this trailing semicolon --> $DIR/unit_return_expecting_ord.rs:19:24 | LL | double(s.field); | ^ + = note: `-D clippy::unit-return-expecting-ord` implied by `-D warnings` error: this closure returns the unit type which also implements PartialOrd --> $DIR/unit_return_expecting_ord.rs:22:30 diff --git a/tests/ui/unnecessary_self_imports.stderr b/tests/ui/unnecessary_self_imports.stderr index 83a5618c983d..db805eb3680b 100644 --- a/tests/ui/unnecessary_self_imports.stderr +++ b/tests/ui/unnecessary_self_imports.stderr @@ -6,8 +6,8 @@ LL | use std::fs::{self as alias}; | | | help: consider omitting `::{self}`: `fs as alias;` | - = note: `-D clippy::unnecessary-self-imports` implied by `-D warnings` = note: this will slightly change semantics; any non-module items at the same path will also be imported + = note: `-D clippy::unnecessary-self-imports` implied by `-D warnings` error: import ending with `::{self}` --> $DIR/unnecessary_self_imports.rs:8:1 diff --git a/tests/ui/unnecessary_to_owned.stderr b/tests/ui/unnecessary_to_owned.stderr index 7deb90b06f3b..02bf45a33fbe 100644 --- a/tests/ui/unnecessary_to_owned.stderr +++ b/tests/ui/unnecessary_to_owned.stderr @@ -4,12 +4,12 @@ error: redundant clone LL | require_c_str(&CString::from_vec_with_nul(vec![0]).unwrap().to_owned()); | ^^^^^^^^^^^ help: remove this | - = note: `-D clippy::redundant-clone` implied by `-D warnings` note: this value is dropped without further use --> $DIR/unnecessary_to_owned.rs:151:20 | LL | require_c_str(&CString::from_vec_with_nul(vec![0]).unwrap().to_owned()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: `-D clippy::redundant-clone` implied by `-D warnings` error: redundant clone --> $DIR/unnecessary_to_owned.rs:152:40 diff --git a/tests/ui/unneeded_field_pattern.stderr b/tests/ui/unneeded_field_pattern.stderr index b8d3c2945322..6f7c31545696 100644 --- a/tests/ui/unneeded_field_pattern.stderr +++ b/tests/ui/unneeded_field_pattern.stderr @@ -4,8 +4,8 @@ error: you matched a field with a wildcard pattern, consider using `..` instead LL | Foo { a: _, b: 0, .. } => {}, | ^^^^ | - = note: `-D clippy::unneeded-field-pattern` implied by `-D warnings` = help: try with `Foo { b: 0, .. }` + = note: `-D clippy::unneeded-field-pattern` implied by `-D warnings` error: all the struct fields are matched to a wildcard pattern, consider using `..` --> $DIR/unneeded_field_pattern.rs:16:9 diff --git a/tests/ui/unsafe_derive_deserialize.stderr b/tests/ui/unsafe_derive_deserialize.stderr index 18c4276c6ddf..8aaae2d7fff4 100644 --- a/tests/ui/unsafe_derive_deserialize.stderr +++ b/tests/ui/unsafe_derive_deserialize.stderr @@ -4,8 +4,8 @@ error: you are deriving `serde::Deserialize` on a type that has methods using `u LL | #[derive(Deserialize)] | ^^^^^^^^^^^ | - = note: `-D clippy::unsafe-derive-deserialize` implied by `-D warnings` = help: consider implementing `serde::Deserialize` manually. See https://serde.rs/impl-deserialize.html + = note: `-D clippy::unsafe-derive-deserialize` implied by `-D warnings` = note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) error: you are deriving `serde::Deserialize` on a type that has methods using `unsafe` diff --git a/tests/ui/unused_async.stderr b/tests/ui/unused_async.stderr index 8b8ad065a4ca..cff3eccbd32b 100644 --- a/tests/ui/unused_async.stderr +++ b/tests/ui/unused_async.stderr @@ -6,8 +6,8 @@ LL | | 4 LL | | } | |_^ | - = note: `-D clippy::unused-async` implied by `-D warnings` = help: consider removing the `async` from this function + = note: `-D clippy::unused-async` implied by `-D warnings` error: unused `async` for function with no await statements --> $DIR/unused_async.rs:17:5 diff --git a/tests/ui/unused_io_amount.stderr b/tests/ui/unused_io_amount.stderr index e5bdd993aa1a..7ba7e09c0f0d 100644 --- a/tests/ui/unused_io_amount.stderr +++ b/tests/ui/unused_io_amount.stderr @@ -4,8 +4,8 @@ error: written amount is not handled LL | s.write(b"test")?; | ^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::unused-io-amount` implied by `-D warnings` = help: use `Write::write_all` instead, or handle partial writes + = note: `-D clippy::unused-io-amount` implied by `-D warnings` error: read amount is not handled --> $DIR/unused_io_amount.rs:11:5 diff --git a/tests/ui/unused_peekable.stderr b/tests/ui/unused_peekable.stderr index d557f54179db..54788f2fa2f4 100644 --- a/tests/ui/unused_peekable.stderr +++ b/tests/ui/unused_peekable.stderr @@ -4,8 +4,8 @@ error: `peek` never called on `Peekable` iterator LL | let peekable = std::iter::empty::().peekable(); | ^^^^^^^^ | - = note: `-D clippy::unused-peekable` implied by `-D warnings` = help: consider removing the call to `peekable` + = note: `-D clippy::unused-peekable` implied by `-D warnings` error: `peek` never called on `Peekable` iterator --> $DIR/unused_peekable.rs:18:9 diff --git a/tests/ui/unused_self.stderr b/tests/ui/unused_self.stderr index 0534b40eabb7..23186122a9af 100644 --- a/tests/ui/unused_self.stderr +++ b/tests/ui/unused_self.stderr @@ -4,8 +4,8 @@ error: unused `self` argument LL | fn unused_self_move(self) {} | ^^^^ | - = note: `-D clippy::unused-self` implied by `-D warnings` = help: consider refactoring to a associated function + = note: `-D clippy::unused-self` implied by `-D warnings` error: unused `self` argument --> $DIR/unused_self.rs:12:28 diff --git a/tests/ui/unwrap.stderr b/tests/ui/unwrap.stderr index 78422757819d..e88d580f7bd2 100644 --- a/tests/ui/unwrap.stderr +++ b/tests/ui/unwrap.stderr @@ -4,8 +4,8 @@ error: used `unwrap()` on `an Option` value LL | let _ = opt.unwrap(); | ^^^^^^^^^^^^ | - = note: `-D clippy::unwrap-used` implied by `-D warnings` = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message + = note: `-D clippy::unwrap-used` implied by `-D warnings` error: used `unwrap()` on `a Result` value --> $DIR/unwrap.rs:10:13 diff --git a/tests/ui/unwrap_expect_used.stderr b/tests/ui/unwrap_expect_used.stderr index 1a19459b2c17..211d2be18342 100644 --- a/tests/ui/unwrap_expect_used.stderr +++ b/tests/ui/unwrap_expect_used.stderr @@ -4,8 +4,8 @@ error: used `unwrap()` on `an Option` value LL | Some(3).unwrap(); | ^^^^^^^^^^^^^^^^ | - = note: `-D clippy::unwrap-used` implied by `-D warnings` = help: if this value is `None`, it will panic + = note: `-D clippy::unwrap-used` implied by `-D warnings` error: used `expect()` on `an Option` value --> $DIR/unwrap_expect_used.rs:24:5 @@ -13,8 +13,8 @@ error: used `expect()` on `an Option` value LL | Some(3).expect("Hello world!"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::expect-used` implied by `-D warnings` = help: if this value is `None`, it will panic + = note: `-D clippy::expect-used` implied by `-D warnings` error: used `unwrap()` on `a Result` value --> $DIR/unwrap_expect_used.rs:31:5 diff --git a/tests/ui/unwrap_in_result.stderr b/tests/ui/unwrap_in_result.stderr index 56bc2f2d1c00..40e6bfe087e7 100644 --- a/tests/ui/unwrap_in_result.stderr +++ b/tests/ui/unwrap_in_result.stderr @@ -10,13 +10,13 @@ LL | | } LL | | } | |_____^ | - = note: `-D clippy::unwrap-in-result` implied by `-D warnings` = help: unwrap and expect should not be used in a function that returns result or option note: potential non-recoverable error(s) --> $DIR/unwrap_in_result.rs:24:17 | LL | let i = i_str.parse::().unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: `-D clippy::unwrap-in-result` implied by `-D warnings` error: used unwrap or expect in a function that returns result or option --> $DIR/unwrap_in_result.rs:32:5 diff --git a/tests/ui/useless_conversion_try.stderr b/tests/ui/useless_conversion_try.stderr index 12e74d614717..9aef9dda6f68 100644 --- a/tests/ui/useless_conversion_try.stderr +++ b/tests/ui/useless_conversion_try.stderr @@ -4,12 +4,12 @@ error: useless conversion to the same type: `T` LL | let _ = T::try_from(val).unwrap(); | ^^^^^^^^^^^^^^^^ | + = help: consider removing `T::try_from()` note: the lint level is defined here --> $DIR/useless_conversion_try.rs:1:9 | LL | #![deny(clippy::useless_conversion)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: consider removing `T::try_from()` error: useless conversion to the same type: `T` --> $DIR/useless_conversion_try.rs:5:5 diff --git a/tests/ui/vec_resize_to_zero.stderr b/tests/ui/vec_resize_to_zero.stderr index 7428cf62d6c4..8851e9f38be4 100644 --- a/tests/ui/vec_resize_to_zero.stderr +++ b/tests/ui/vec_resize_to_zero.stderr @@ -6,8 +6,8 @@ LL | v.resize(0, 5); | | | help: ...or you can empty the vector with: `clear()` | - = note: `-D clippy::vec-resize-to-zero` implied by `-D warnings` = help: the arguments may be inverted... + = note: `-D clippy::vec-resize-to-zero` implied by `-D warnings` error: aborting due to previous error diff --git a/tests/ui/verbose_file_reads.stderr b/tests/ui/verbose_file_reads.stderr index 550b6ab679f1..44266c7c01f3 100644 --- a/tests/ui/verbose_file_reads.stderr +++ b/tests/ui/verbose_file_reads.stderr @@ -4,8 +4,8 @@ error: use of `File::read_to_end` LL | f.read_to_end(&mut buffer)?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::verbose-file-reads` implied by `-D warnings` = help: consider using `fs::read` instead + = note: `-D clippy::verbose-file-reads` implied by `-D warnings` error: use of `File::read_to_string` --> $DIR/verbose_file_reads.rs:26:5 diff --git a/tests/ui/vtable_address_comparisons.stderr b/tests/ui/vtable_address_comparisons.stderr index 2f1be61e5df7..14748f583f0c 100644 --- a/tests/ui/vtable_address_comparisons.stderr +++ b/tests/ui/vtable_address_comparisons.stderr @@ -4,8 +4,8 @@ error: comparing trait object pointers compares a non-unique vtable address LL | let _ = a == b; | ^^^^^^ | - = note: `-D clippy::vtable-address-comparisons` implied by `-D warnings` = help: consider extracting and comparing data pointers only + = note: `-D clippy::vtable-address-comparisons` implied by `-D warnings` error: comparing trait object pointers compares a non-unique vtable address --> $DIR/vtable_address_comparisons.rs:15:13 diff --git a/tests/ui/wild_in_or_pats.stderr b/tests/ui/wild_in_or_pats.stderr index 45b87aa0f20b..bd5860f45ca6 100644 --- a/tests/ui/wild_in_or_pats.stderr +++ b/tests/ui/wild_in_or_pats.stderr @@ -4,8 +4,8 @@ error: wildcard pattern covers any other pattern as it will match anyway LL | "bar" | _ => { | ^^^^^^^^^ | - = note: `-D clippy::wildcard-in-or-patterns` implied by `-D warnings` = help: consider handling `_` separately + = note: `-D clippy::wildcard-in-or-patterns` implied by `-D warnings` error: wildcard pattern covers any other pattern as it will match anyway --> $DIR/wild_in_or_pats.rs:16:9 diff --git a/tests/ui/wrong_self_convention.stderr b/tests/ui/wrong_self_convention.stderr index 2e7ee51d7e11..d002e55c5708 100644 --- a/tests/ui/wrong_self_convention.stderr +++ b/tests/ui/wrong_self_convention.stderr @@ -4,8 +4,8 @@ error: methods called `from_*` usually take no `self` LL | fn from_i32(self) {} | ^^^^ | - = note: `-D clippy::wrong-self-convention` implied by `-D warnings` = help: consider choosing a less ambiguous name + = note: `-D clippy::wrong-self-convention` implied by `-D warnings` error: methods called `from_*` usually take no `self` --> $DIR/wrong_self_convention.rs:22:21 diff --git a/tests/ui/wrong_self_convention2.stderr b/tests/ui/wrong_self_convention2.stderr index 5bdc47f91f65..8de10e7be69c 100644 --- a/tests/ui/wrong_self_convention2.stderr +++ b/tests/ui/wrong_self_convention2.stderr @@ -4,8 +4,8 @@ error: methods called `from_*` usually take no `self` LL | pub fn from_be_self(self) -> Self { | ^^^^ | - = note: `-D clippy::wrong-self-convention` implied by `-D warnings` = help: consider choosing a less ambiguous name + = note: `-D clippy::wrong-self-convention` implied by `-D warnings` error: methods called `from_*` usually take no `self` --> $DIR/wrong_self_convention2.rs:63:25 diff --git a/tests/ui/wrong_self_conventions_mut.stderr b/tests/ui/wrong_self_conventions_mut.stderr index 8665d8dc9a9d..3d009083cee3 100644 --- a/tests/ui/wrong_self_conventions_mut.stderr +++ b/tests/ui/wrong_self_conventions_mut.stderr @@ -4,8 +4,8 @@ error: methods with the following characteristics: (`to_*` and `self` type is no LL | pub fn to_many(&mut self) -> Option<&mut [T]> { | ^^^^^^^^^ | - = note: `-D clippy::wrong-self-convention` implied by `-D warnings` = help: consider choosing a less ambiguous name + = note: `-D clippy::wrong-self-convention` implied by `-D warnings` error: methods with the following characteristics: (`to_*` and `*_mut`) usually take `self` by mutable reference --> $DIR/wrong_self_conventions_mut.rs:22:28 diff --git a/tests/ui/zero_div_zero.stderr b/tests/ui/zero_div_zero.stderr index 86563542e060..2793d1606445 100644 --- a/tests/ui/zero_div_zero.stderr +++ b/tests/ui/zero_div_zero.stderr @@ -4,8 +4,8 @@ error: constant division of `0.0` with `0.0` will always result in NaN 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 + = note: `-D clippy::zero-divided-by-zero` implied by `-D warnings` error: constant division of `0.0` with `0.0` will always result in NaN --> $DIR/zero_div_zero.rs:5:19 diff --git a/tests/ui/zero_sized_btreemap_values.stderr b/tests/ui/zero_sized_btreemap_values.stderr index d924f33797d2..c6ba6fa76f05 100644 --- a/tests/ui/zero_sized_btreemap_values.stderr +++ b/tests/ui/zero_sized_btreemap_values.stderr @@ -4,8 +4,8 @@ error: map with zero-sized value type LL | const CONST_NOT_OK: Option> = None; | ^^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::zero-sized-map-values` implied by `-D warnings` = help: consider using a set instead + = note: `-D clippy::zero-sized-map-values` implied by `-D warnings` error: map with zero-sized value type --> $DIR/zero_sized_btreemap_values.rs:8:30 diff --git a/tests/ui/zero_sized_hashmap_values.stderr b/tests/ui/zero_sized_hashmap_values.stderr index 79770bf90d70..75bdeb42ec0d 100644 --- a/tests/ui/zero_sized_hashmap_values.stderr +++ b/tests/ui/zero_sized_hashmap_values.stderr @@ -4,8 +4,8 @@ error: map with zero-sized value type LL | const CONST_NOT_OK: Option> = None; | ^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::zero-sized-map-values` implied by `-D warnings` = help: consider using a set instead + = note: `-D clippy::zero-sized-map-values` implied by `-D warnings` error: map with zero-sized value type --> $DIR/zero_sized_hashmap_values.rs:8:30