about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui-cargo/module_style/fail_mod_remap/Cargo.toml9
-rw-r--r--tests/ui-cargo/module_style/fail_mod_remap/src/bad.rs1
-rw-r--r--tests/ui-cargo/module_style/fail_mod_remap/src/bad/inner.rs1
-rw-r--r--tests/ui-cargo/module_style/fail_mod_remap/src/main.rs7
-rw-r--r--tests/ui-cargo/module_style/fail_mod_remap/src/main.stderr11
-rw-r--r--tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs1
-rw-r--r--tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.stderr30
-rw-r--r--tests/ui/almost_complete_letter_range.fixed13
-rw-r--r--tests/ui/almost_complete_letter_range.rs13
-rw-r--r--tests/ui/almost_complete_letter_range.stderr39
-rw-r--r--tests/ui/arithmetic_side_effects.rs104
-rw-r--r--tests/ui/arithmetic_side_effects.stderr92
-rw-r--r--tests/ui/assertions_on_result_states.fixed6
-rw-r--r--tests/ui/assertions_on_result_states.rs6
-rw-r--r--tests/ui/assertions_on_result_states.stderr8
-rw-r--r--tests/ui/auxiliary/macro_rules.rs7
-rw-r--r--tests/ui/bool_to_int_with_if.fixed8
-rw-r--r--tests/ui/bool_to_int_with_if.rs14
-rw-r--r--tests/ui/bool_to_int_with_if.stderr41
-rw-r--r--tests/ui/collapsible_if.fixed3
-rw-r--r--tests/ui/collapsible_if.rs5
-rw-r--r--tests/ui/collapsible_if.stderr10
-rw-r--r--tests/ui/crashes/ice-9463.rs5
-rw-r--r--tests/ui/crashes/ice-9463.stderr29
-rw-r--r--tests/ui/derivable_impls.fixed213
-rw-r--r--tests/ui/derivable_impls.rs4
-rw-r--r--tests/ui/derivable_impls.stderr56
-rw-r--r--tests/ui/eprint_with_newline.rs10
-rw-r--r--tests/ui/eprint_with_newline.stderr18
-rw-r--r--tests/ui/explicit_write.fixed2
-rw-r--r--tests/ui/explicit_write.rs2
-rw-r--r--tests/ui/explicit_write.stderr8
-rw-r--r--tests/ui/format.fixed4
-rw-r--r--tests/ui/format.rs4
-rw-r--r--tests/ui/format.stderr44
-rw-r--r--tests/ui/iter_kv_map.fixed64
-rw-r--r--tests/ui/iter_kv_map.rs64
-rw-r--r--tests/ui/iter_kv_map.stderr136
-rw-r--r--tests/ui/large_enum_variant.rs4
-rw-r--r--tests/ui/large_enum_variant.stderr16
-rw-r--r--tests/ui/large_stack_arrays.rs6
-rw-r--r--tests/ui/large_stack_arrays.stderr8
-rw-r--r--tests/ui/len_without_is_empty.rs2
-rw-r--r--tests/ui/nonminimal_bool.rs6
-rw-r--r--tests/ui/nonminimal_bool.stderr8
-rw-r--r--tests/ui/positional_named_format_parameters.fixed56
-rw-r--r--tests/ui/positional_named_format_parameters.rs56
-rw-r--r--tests/ui/positional_named_format_parameters.stderr418
-rw-r--r--tests/ui/print_literal.rs2
-rw-r--r--tests/ui/print_literal.stderr56
-rw-r--r--tests/ui/print_with_newline.rs10
-rw-r--r--tests/ui/print_with_newline.stderr18
-rw-r--r--tests/ui/println_empty_string.stderr24
-rw-r--r--tests/ui/rename.fixed2
-rw-r--r--tests/ui/rename.rs2
-rw-r--r--tests/ui/rename.stderr82
-rw-r--r--tests/ui/unnecessary_to_owned.fixed9
-rw-r--r--tests/ui/unnecessary_to_owned.rs9
-rw-r--r--tests/ui/unused_peekable.rs33
-rw-r--r--tests/ui/use_self.fixed9
-rw-r--r--tests/ui/use_self.rs9
-rw-r--r--tests/ui/write_literal.rs2
-rw-r--r--tests/ui/write_literal.stderr56
-rw-r--r--tests/ui/write_literal_2.rs9
-rw-r--r--tests/ui/write_literal_2.stderr80
-rw-r--r--tests/ui/write_with_newline.rs8
-rw-r--r--tests/ui/write_with_newline.stderr38
-rw-r--r--tests/ui/writeln_empty_string.stderr12
68 files changed, 1324 insertions, 818 deletions
diff --git a/tests/ui-cargo/module_style/fail_mod_remap/Cargo.toml b/tests/ui-cargo/module_style/fail_mod_remap/Cargo.toml
new file mode 100644
index 00000000000..a822fad388f
--- /dev/null
+++ b/tests/ui-cargo/module_style/fail_mod_remap/Cargo.toml
@@ -0,0 +1,9 @@
+[package]
+name = "fail-mod-remap"
+version = "0.1.0"
+edition = "2018"
+publish = false
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/tests/ui-cargo/module_style/fail_mod_remap/src/bad.rs b/tests/ui-cargo/module_style/fail_mod_remap/src/bad.rs
new file mode 100644
index 00000000000..509aad18622
--- /dev/null
+++ b/tests/ui-cargo/module_style/fail_mod_remap/src/bad.rs
@@ -0,0 +1 @@
+pub mod inner;
diff --git a/tests/ui-cargo/module_style/fail_mod_remap/src/bad/inner.rs b/tests/ui-cargo/module_style/fail_mod_remap/src/bad/inner.rs
new file mode 100644
index 00000000000..8b137891791
--- /dev/null
+++ b/tests/ui-cargo/module_style/fail_mod_remap/src/bad/inner.rs
@@ -0,0 +1 @@
+
diff --git a/tests/ui-cargo/module_style/fail_mod_remap/src/main.rs b/tests/ui-cargo/module_style/fail_mod_remap/src/main.rs
new file mode 100644
index 00000000000..ba4c8c873dd
--- /dev/null
+++ b/tests/ui-cargo/module_style/fail_mod_remap/src/main.rs
@@ -0,0 +1,7 @@
+// compile-flags: --remap-path-prefix {{src-base}}=/remapped
+
+#![warn(clippy::self_named_module_files)]
+
+mod bad;
+
+fn main() {}
diff --git a/tests/ui-cargo/module_style/fail_mod_remap/src/main.stderr b/tests/ui-cargo/module_style/fail_mod_remap/src/main.stderr
new file mode 100644
index 00000000000..46991ff662e
--- /dev/null
+++ b/tests/ui-cargo/module_style/fail_mod_remap/src/main.stderr
@@ -0,0 +1,11 @@
+error: `mod.rs` files are required, found `bad.rs`
+  --> /remapped/module_style/fail_mod_remap/src/bad.rs:1:1
+   |
+LL | pub mod inner;
+   | ^
+   |
+   = note: `-D clippy::self-named-module-files` implied by `-D warnings`
+   = help: move `bad.rs` to `bad/mod.rs`
+
+error: aborting due to previous error
+
diff --git a/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs b/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs
index 5b4adc868df..ed8161acc0e 100644
--- a/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs
+++ b/tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs
@@ -42,6 +42,7 @@ macro_rules! printlnfoo {
 fn main() {
     let _ = vec! {1, 2, 3};
     let _ = format!["ugh {} stop being such a good compiler", "hello"];
+    let _ = matches!{{}, ()};
     let _ = quote!(let x = 1;);
     let _ = quote::quote!(match match match);
     let _ = test!(); // trigger when macro def is inside our own crate
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 039b23b1bdb..d80ad49f308 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
@@ -23,26 +23,38 @@ help: consider writing `format!("ugh () stop being such a good compiler", "hello
 LL |     let _ = format!["ugh {} stop being such a good compiler", "hello"];
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: use of irregular braces for `quote!` macro
+error: use of irregular braces for `matches!` macro
+  --> $DIR/conf_nonstandard_macro_braces.rs:45:13
+   |
+LL |     let _ = matches!{{}, ()};
+   |             ^^^^^^^^^^^^^^^^
+   |
+help: consider writing `matches!((), ())`
   --> $DIR/conf_nonstandard_macro_braces.rs:45:13
    |
+LL |     let _ = matches!{{}, ()};
+   |             ^^^^^^^^^^^^^^^^
+
+error: use of irregular braces for `quote!` macro
+  --> $DIR/conf_nonstandard_macro_braces.rs:46:13
+   |
 LL |     let _ = quote!(let x = 1;);
    |             ^^^^^^^^^^^^^^^^^^
    |
 help: consider writing `quote! {let x = 1;}`
-  --> $DIR/conf_nonstandard_macro_braces.rs:45:13
+  --> $DIR/conf_nonstandard_macro_braces.rs:46:13
    |
 LL |     let _ = quote!(let x = 1;);
    |             ^^^^^^^^^^^^^^^^^^
 
 error: use of irregular braces for `quote::quote!` macro
-  --> $DIR/conf_nonstandard_macro_braces.rs:46:13
+  --> $DIR/conf_nonstandard_macro_braces.rs:47:13
    |
 LL |     let _ = quote::quote!(match match match);
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 help: consider writing `quote::quote! {match match match}`
-  --> $DIR/conf_nonstandard_macro_braces.rs:46:13
+  --> $DIR/conf_nonstandard_macro_braces.rs:47:13
    |
 LL |     let _ = quote::quote!(match match match);
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -67,28 +79,28 @@ LL |     let _ = test!(); // trigger when macro def is inside our own crate
    = note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: use of irregular braces for `type_pos!` macro
-  --> $DIR/conf_nonstandard_macro_braces.rs:55:12
+  --> $DIR/conf_nonstandard_macro_braces.rs:56:12
    |
 LL |     let _: type_pos!(usize) = vec![];
    |            ^^^^^^^^^^^^^^^^
    |
 help: consider writing `type_pos![usize]`
-  --> $DIR/conf_nonstandard_macro_braces.rs:55:12
+  --> $DIR/conf_nonstandard_macro_braces.rs:56:12
    |
 LL |     let _: type_pos!(usize) = vec![];
    |            ^^^^^^^^^^^^^^^^
 
 error: use of irregular braces for `eprint!` macro
-  --> $DIR/conf_nonstandard_macro_braces.rs:57:5
+  --> $DIR/conf_nonstandard_macro_braces.rs:58:5
    |
 LL |     eprint!("test if user config overrides defaults");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 help: consider writing `eprint!["test if user config overrides defaults"]`
-  --> $DIR/conf_nonstandard_macro_braces.rs:57:5
+  --> $DIR/conf_nonstandard_macro_braces.rs:58:5
    |
 LL |     eprint!("test if user config overrides defaults");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 7 previous errors
+error: aborting due to 8 previous errors
 
diff --git a/tests/ui/almost_complete_letter_range.fixed b/tests/ui/almost_complete_letter_range.fixed
index e69b40f35f4..079b7c000dc 100644
--- a/tests/ui/almost_complete_letter_range.fixed
+++ b/tests/ui/almost_complete_letter_range.fixed
@@ -1,5 +1,6 @@
 // run-rustfix
 // edition:2018
+// aux-build:macro_rules.rs
 
 #![feature(custom_inner_attributes)]
 #![feature(exclusive_range_pattern)]
@@ -8,12 +9,21 @@
 #![allow(ellipsis_inclusive_range_patterns)]
 #![allow(clippy::needless_parens_on_range_literals)]
 
+#[macro_use]
+extern crate macro_rules;
+
 macro_rules! a {
     () => {
         'a'
     };
 }
 
+macro_rules! b {
+    () => {
+        let _ = 'a'..='z';
+    };
+}
+
 fn main() {
     #[rustfmt::skip]
     {
@@ -47,6 +57,9 @@ fn main() {
         'B'..'Z' => 4,
         _ => 5,
     };
+
+    almost_complete_letter_range!();
+    b!();
 }
 
 fn _under_msrv() {
diff --git a/tests/ui/almost_complete_letter_range.rs b/tests/ui/almost_complete_letter_range.rs
index f2240981d45..a66900a976e 100644
--- a/tests/ui/almost_complete_letter_range.rs
+++ b/tests/ui/almost_complete_letter_range.rs
@@ -1,5 +1,6 @@
 // run-rustfix
 // edition:2018
+// aux-build:macro_rules.rs
 
 #![feature(custom_inner_attributes)]
 #![feature(exclusive_range_pattern)]
@@ -8,12 +9,21 @@
 #![allow(ellipsis_inclusive_range_patterns)]
 #![allow(clippy::needless_parens_on_range_literals)]
 
+#[macro_use]
+extern crate macro_rules;
+
 macro_rules! a {
     () => {
         'a'
     };
 }
 
+macro_rules! b {
+    () => {
+        let _ = 'a'..'z';
+    };
+}
+
 fn main() {
     #[rustfmt::skip]
     {
@@ -47,6 +57,9 @@ fn main() {
         'B'..'Z' => 4,
         _ => 5,
     };
+
+    almost_complete_letter_range!();
+    b!();
 }
 
 fn _under_msrv() {
diff --git a/tests/ui/almost_complete_letter_range.stderr b/tests/ui/almost_complete_letter_range.stderr
index 5b5dc40ee54..3de44c72c1b 100644
--- a/tests/ui/almost_complete_letter_range.stderr
+++ b/tests/ui/almost_complete_letter_range.stderr
@@ -1,5 +1,5 @@
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:20:17
+  --> $DIR/almost_complete_letter_range.rs:30:17
    |
 LL |         let _ = ('a') ..'z';
    |                 ^^^^^^--^^^
@@ -9,7 +9,7 @@ LL |         let _ = ('a') ..'z';
    = note: `-D clippy::almost-complete-letter-range` implied by `-D warnings`
 
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:21:17
+  --> $DIR/almost_complete_letter_range.rs:31:17
    |
 LL |         let _ = 'A' .. ('Z');
    |                 ^^^^--^^^^^^
@@ -17,7 +17,7 @@ LL |         let _ = 'A' .. ('Z');
    |                     help: use an inclusive range: `..=`
 
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:27:13
+  --> $DIR/almost_complete_letter_range.rs:37:13
    |
 LL |     let _ = (b'a')..(b'z');
    |             ^^^^^^--^^^^^^
@@ -25,7 +25,7 @@ LL |     let _ = (b'a')..(b'z');
    |                   help: use an inclusive range: `..=`
 
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:28:13
+  --> $DIR/almost_complete_letter_range.rs:38:13
    |
 LL |     let _ = b'A'..b'Z';
    |             ^^^^--^^^^
@@ -33,7 +33,7 @@ LL |     let _ = b'A'..b'Z';
    |                 help: use an inclusive range: `..=`
 
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:33:13
+  --> $DIR/almost_complete_letter_range.rs:43:13
    |
 LL |     let _ = a!()..'z';
    |             ^^^^--^^^
@@ -41,7 +41,7 @@ LL |     let _ = a!()..'z';
    |                 help: use an inclusive range: `..=`
 
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:36:9
+  --> $DIR/almost_complete_letter_range.rs:46:9
    |
 LL |         b'a'..b'z' if true => 1,
    |         ^^^^--^^^^
@@ -49,7 +49,7 @@ LL |         b'a'..b'z' if true => 1,
    |             help: use an inclusive range: `..=`
 
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:37:9
+  --> $DIR/almost_complete_letter_range.rs:47:9
    |
 LL |         b'A'..b'Z' if true => 2,
    |         ^^^^--^^^^
@@ -57,7 +57,7 @@ LL |         b'A'..b'Z' if true => 2,
    |             help: use an inclusive range: `..=`
 
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:44:9
+  --> $DIR/almost_complete_letter_range.rs:54:9
    |
 LL |         'a'..'z' if true => 1,
    |         ^^^--^^^
@@ -65,7 +65,7 @@ LL |         'a'..'z' if true => 1,
    |            help: use an inclusive range: `..=`
 
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:45:9
+  --> $DIR/almost_complete_letter_range.rs:55:9
    |
 LL |         'A'..'Z' if true => 2,
    |         ^^^--^^^
@@ -73,7 +73,20 @@ LL |         'A'..'Z' if true => 2,
    |            help: use an inclusive range: `..=`
 
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:55:9
+  --> $DIR/almost_complete_letter_range.rs:23:17
+   |
+LL |         let _ = 'a'..'z';
+   |                 ^^^--^^^
+   |                    |
+   |                    help: use an inclusive range: `..=`
+...
+LL |     b!();
+   |     ---- in this macro invocation
+   |
+   = note: this error originates in the macro `b` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: almost complete ascii letter range
+  --> $DIR/almost_complete_letter_range.rs:68:9
    |
 LL |         'a'..'z' => 1,
    |         ^^^--^^^
@@ -81,7 +94,7 @@ LL |         'a'..'z' => 1,
    |            help: use an inclusive range: `...`
 
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:62:13
+  --> $DIR/almost_complete_letter_range.rs:75:13
    |
 LL |     let _ = 'a'..'z';
    |             ^^^--^^^
@@ -89,12 +102,12 @@ LL |     let _ = 'a'..'z';
    |                help: use an inclusive range: `..=`
 
 error: almost complete ascii letter range
-  --> $DIR/almost_complete_letter_range.rs:64:9
+  --> $DIR/almost_complete_letter_range.rs:77:9
    |
 LL |         'a'..'z' => 1,
    |         ^^^--^^^
    |            |
    |            help: use an inclusive range: `..=`
 
-error: aborting due to 12 previous errors
+error: aborting due to 13 previous errors
 
diff --git a/tests/ui/arithmetic_side_effects.rs b/tests/ui/arithmetic_side_effects.rs
index f5390c74642..dd24f5aa592 100644
--- a/tests/ui/arithmetic_side_effects.rs
+++ b/tests/ui/arithmetic_side_effects.rs
@@ -1,9 +1,49 @@
-#![allow(clippy::assign_op_pattern, clippy::unnecessary_owned_empty_strings)]
+#![allow(
+    clippy::assign_op_pattern,
+    clippy::erasing_op,
+    clippy::identity_op,
+    clippy::unnecessary_owned_empty_strings,
+    arithmetic_overflow,
+    unconditional_panic
+)]
 #![feature(inline_const, saturating_int_impl)]
 #![warn(clippy::arithmetic_side_effects)]
 
 use core::num::{Saturating, Wrapping};
 
+pub fn association_with_structures_should_not_trigger_the_lint() {
+    enum Foo {
+        Bar = -2,
+    }
+
+    impl Trait for Foo {
+        const ASSOC: i32 = {
+            let _: [i32; 1 + 1];
+            fn foo() {}
+            1 + 1
+        };
+    }
+
+    struct Baz([i32; 1 + 1]);
+
+    trait Trait {
+        const ASSOC: i32 = 1 + 1;
+    }
+
+    type Alias = [i32; 1 + 1];
+
+    union Qux {
+        field: [i32; 1 + 1],
+    }
+
+    let _: [i32; 1 + 1] = [0, 0];
+
+    let _: [i32; 1 + 1] = {
+        let a: [i32; 1 + 1] = [0, 0];
+        a
+    };
+}
+
 pub fn hard_coded_allowed() {
     let _ = 1f32 + 1f32;
     let _ = 1f64 + 1f64;
@@ -26,7 +66,7 @@ pub fn hard_coded_allowed() {
 }
 
 #[rustfmt::skip]
-pub fn non_overflowing_ops() {
+pub fn const_ops_should_not_trigger_the_lint() {
     const _: i32 = { let mut n = 1; n += 1; n };
     let _ = const { let mut n = 1; n += 1; n };
 
@@ -37,21 +77,63 @@ pub fn non_overflowing_ops() {
     let _ = const { let mut n = 1; n = 1 + n; n };
 
     const _: i32 = 1 + 1;
-    let _ = 1 + 1;
     let _ = const { 1 + 1 };
 
-    let mut _a = 1;
-    _a *= 1;
-    _a /= 1;
+    const _: i32 = { let mut n = -1; n = -(-1); n = -n; n };
+    let _ = const { let mut n = -1; n = -(-1); n = -n; n };
 }
 
-#[rustfmt::skip]
-pub fn overflowing_ops() {
-    let mut _a = 1; _a += 1;
+pub fn non_overflowing_runtime_ops_or_ops_already_handled_by_the_compiler() {
+    let mut _n = i32::MAX;
+
+    // Assign
+    _n += 0;
+    _n -= 0;
+    _n /= 99;
+    _n %= 99;
+    _n *= 0;
+    _n *= 1;
+
+    // Binary
+    _n = _n + 0;
+    _n = 0 + _n;
+    _n = _n - 0;
+    _n = 0 - _n;
+    _n = _n / 99;
+    _n = _n % 99;
+    _n = _n * 0;
+    _n = 0 * _n;
+    _n = _n * 1;
+    _n = 1 * _n;
+    _n = 23 + 85;
+
+    // Unary
+    _n = -1;
+    _n = -(-1);
+}
+
+pub fn overflowing_runtime_ops() {
+    let mut _n = i32::MAX;
+
+    // Assign
+    _n += 1;
+    _n -= 1;
+    _n /= 0;
+    _n %= 0;
+    _n *= 2;
 
-    let mut _b = 1; _b = _b + 1;
+    // Binary
+    _n = _n + 1;
+    _n = 1 + _n;
+    _n = _n - 1;
+    _n = 1 - _n;
+    _n = _n / 0;
+    _n = _n % 0;
+    _n = _n * 2;
+    _n = 2 * _n;
 
-    let mut _c = 1; _c = 1 + _c;
+    // Unary
+    _n = -_n;
 }
 
 fn main() {}
diff --git a/tests/ui/arithmetic_side_effects.stderr b/tests/ui/arithmetic_side_effects.stderr
index 6c4c8bdec0f..a2a856efbff 100644
--- a/tests/ui/arithmetic_side_effects.stderr
+++ b/tests/ui/arithmetic_side_effects.stderr
@@ -1,22 +1,88 @@
-error: arithmetic detected
-  --> $DIR/arithmetic_side_effects.rs:50:21
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:119:5
    |
-LL |     let mut _a = 1; _a += 1;
-   |                     ^^^^^^^
+LL |     _n += 1;
+   |     ^^^^^^^
    |
    = note: `-D clippy::arithmetic-side-effects` implied by `-D warnings`
 
-error: arithmetic detected
-  --> $DIR/arithmetic_side_effects.rs:52:26
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:120:5
    |
-LL |     let mut _b = 1; _b = _b + 1;
-   |                          ^^^^^^
+LL |     _n -= 1;
+   |     ^^^^^^^
 
-error: arithmetic detected
-  --> $DIR/arithmetic_side_effects.rs:54:26
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:121:5
    |
-LL |     let mut _c = 1; _c = 1 + _c;
-   |                          ^^^^^^
+LL |     _n /= 0;
+   |     ^^^^^^^
 
-error: aborting due to 3 previous errors
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:122:5
+   |
+LL |     _n %= 0;
+   |     ^^^^^^^
+
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:123:5
+   |
+LL |     _n *= 2;
+   |     ^^^^^^^
+
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:126:10
+   |
+LL |     _n = _n + 1;
+   |          ^^^^^^
+
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:127:10
+   |
+LL |     _n = 1 + _n;
+   |          ^^^^^^
+
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:128:10
+   |
+LL |     _n = _n - 1;
+   |          ^^^^^^
+
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:129:10
+   |
+LL |     _n = 1 - _n;
+   |          ^^^^^^
+
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:130:10
+   |
+LL |     _n = _n / 0;
+   |          ^^^^^^
+
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:131:10
+   |
+LL |     _n = _n % 0;
+   |          ^^^^^^
+
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:132:10
+   |
+LL |     _n = _n * 2;
+   |          ^^^^^^
+
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:133:10
+   |
+LL |     _n = 2 * _n;
+   |          ^^^^^^
+
+error: arithmetic operation that can potentially result in unexpected side-effects
+  --> $DIR/arithmetic_side_effects.rs:136:10
+   |
+LL |     _n = -_n;
+   |          ^^^
+
+error: aborting due to 14 previous errors
 
diff --git a/tests/ui/assertions_on_result_states.fixed b/tests/ui/assertions_on_result_states.fixed
index 795f435f24c..2bb755290c5 100644
--- a/tests/ui/assertions_on_result_states.fixed
+++ b/tests/ui/assertions_on_result_states.fixed
@@ -75,3 +75,9 @@ fn main() {
     let r: Result<Foo, Foo> = Err(Foo);
     assert!(r.is_err());
 }
+
+#[allow(dead_code)]
+fn issue9450() {
+    let res: Result<i32, i32> = Ok(1);
+    res.unwrap_err();
+}
diff --git a/tests/ui/assertions_on_result_states.rs b/tests/ui/assertions_on_result_states.rs
index 1101aec1e1b..d8a9bd2f1c4 100644
--- a/tests/ui/assertions_on_result_states.rs
+++ b/tests/ui/assertions_on_result_states.rs
@@ -75,3 +75,9 @@ fn main() {
     let r: Result<Foo, Foo> = Err(Foo);
     assert!(r.is_err());
 }
+
+#[allow(dead_code)]
+fn issue9450() {
+    let res: Result<i32, i32> = Ok(1);
+    assert!(res.is_err())
+}
diff --git a/tests/ui/assertions_on_result_states.stderr b/tests/ui/assertions_on_result_states.stderr
index 97a5f3dfca4..298d63c9c34 100644
--- a/tests/ui/assertions_on_result_states.stderr
+++ b/tests/ui/assertions_on_result_states.stderr
@@ -36,5 +36,11 @@ error: called `assert!` with `Result::is_err`
 LL |     assert!(r.is_err());
    |     ^^^^^^^^^^^^^^^^^^^ help: replace with: `r.unwrap_err()`
 
-error: aborting due to 6 previous errors
+error: called `assert!` with `Result::is_err`
+  --> $DIR/assertions_on_result_states.rs:82:5
+   |
+LL |     assert!(res.is_err())
+   |     ^^^^^^^^^^^^^^^^^^^^^ help: replace with: `res.unwrap_err();`
+
+error: aborting due to 7 previous errors
 
diff --git a/tests/ui/auxiliary/macro_rules.rs b/tests/ui/auxiliary/macro_rules.rs
index 83a0af6b87a..ef3ca9aea38 100644
--- a/tests/ui/auxiliary/macro_rules.rs
+++ b/tests/ui/auxiliary/macro_rules.rs
@@ -140,3 +140,10 @@ macro_rules! manual_rem_euclid {
 macro_rules! equatable_if_let {
     ($a:ident) => {{ if let 2 = $a {} }};
 }
+
+#[macro_export]
+macro_rules! almost_complete_letter_range {
+    () => {
+        let _ = 'a'..'z';
+    };
+}
diff --git a/tests/ui/bool_to_int_with_if.fixed b/tests/ui/bool_to_int_with_if.fixed
index 9c1098dc4c1..2c8339cdd7f 100644
--- a/tests/ui/bool_to_int_with_if.fixed
+++ b/tests/ui/bool_to_int_with_if.fixed
@@ -14,6 +14,7 @@ fn main() {
     // precedence
     i32::from(a);
     i32::from(!a);
+    i32::from(!a);
     i32::from(a || b);
     i32::from(cond(a, b));
     i32::from(x + y < 4);
@@ -21,7 +22,12 @@ fn main() {
     // if else if
     if a {
         123
-    } else {i32::from(b)};
+    } else { i32::from(b) };
+
+    // if else if inverted
+    if a {
+        123
+    } else { i32::from(!b) };
 
     // Shouldn't lint
 
diff --git a/tests/ui/bool_to_int_with_if.rs b/tests/ui/bool_to_int_with_if.rs
index 0c967dac6e2..5d9496f0177 100644
--- a/tests/ui/bool_to_int_with_if.rs
+++ b/tests/ui/bool_to_int_with_if.rs
@@ -17,6 +17,11 @@ fn main() {
     } else {
         0
     };
+    if a {
+        0
+    } else {
+        1
+    };
     if !a {
         1
     } else {
@@ -47,6 +52,15 @@ fn main() {
         0
     };
 
+    // if else if inverted
+    if a {
+        123
+    } else if b {
+        0
+    } else {
+        1
+    };
+
     // Shouldn't lint
 
     if a {
diff --git a/tests/ui/bool_to_int_with_if.stderr b/tests/ui/bool_to_int_with_if.stderr
index 8647a9cffbe..e695440f668 100644
--- a/tests/ui/bool_to_int_with_if.stderr
+++ b/tests/ui/bool_to_int_with_if.stderr
@@ -14,6 +14,18 @@ LL | |     };
 error: boolean to int conversion using if
   --> $DIR/bool_to_int_with_if.rs:20:5
    |
+LL | /     if a {
+LL | |         0
+LL | |     } else {
+LL | |         1
+LL | |     };
+   | |_____^ help: replace with from: `i32::from(!a)`
+   |
+   = note: `!a as i32` or `(!a).into()` can also be valid options
+
+error: boolean to int conversion using if
+  --> $DIR/bool_to_int_with_if.rs:25:5
+   |
 LL | /     if !a {
 LL | |         1
 LL | |     } else {
@@ -21,10 +33,10 @@ LL | |         0
 LL | |     };
    | |_____^ help: replace with from: `i32::from(!a)`
    |
-   = note: `!a as i32` or `!a.into()` can also be valid options
+   = note: `!a as i32` or `(!a).into()` can also be valid options
 
 error: boolean to int conversion using if
-  --> $DIR/bool_to_int_with_if.rs:25:5
+  --> $DIR/bool_to_int_with_if.rs:30:5
    |
 LL | /     if a || b {
 LL | |         1
@@ -36,7 +48,7 @@ LL | |     };
    = note: `(a || b) as i32` or `(a || b).into()` can also be valid options
 
 error: boolean to int conversion using if
-  --> $DIR/bool_to_int_with_if.rs:30:5
+  --> $DIR/bool_to_int_with_if.rs:35:5
    |
 LL | /     if cond(a, b) {
 LL | |         1
@@ -48,7 +60,7 @@ LL | |     };
    = note: `cond(a, b) as i32` or `cond(a, b).into()` can also be valid options
 
 error: boolean to int conversion using if
-  --> $DIR/bool_to_int_with_if.rs:35:5
+  --> $DIR/bool_to_int_with_if.rs:40:5
    |
 LL | /     if x + y < 4 {
 LL | |         1
@@ -60,7 +72,7 @@ LL | |     };
    = note: `(x + y < 4) as i32` or `(x + y < 4).into()` can also be valid options
 
 error: boolean to int conversion using if
-  --> $DIR/bool_to_int_with_if.rs:44:12
+  --> $DIR/bool_to_int_with_if.rs:49:12
    |
 LL |       } else if b {
    |  ____________^
@@ -68,17 +80,30 @@ LL | |         1
 LL | |     } else {
 LL | |         0
 LL | |     };
-   | |_____^ help: replace with from: `{i32::from(b)}`
+   | |_____^ help: replace with from: `{ i32::from(b) }`
    |
    = note: `b as i32` or `b.into()` can also be valid options
 
 error: boolean to int conversion using if
-  --> $DIR/bool_to_int_with_if.rs:102:5
+  --> $DIR/bool_to_int_with_if.rs:58:12
+   |
+LL |       } else if b {
+   |  ____________^
+LL | |         0
+LL | |     } else {
+LL | |         1
+LL | |     };
+   | |_____^ help: replace with from: `{ i32::from(!b) }`
+   |
+   = note: `!b as i32` or `(!b).into()` can also be valid options
+
+error: boolean to int conversion using if
+  --> $DIR/bool_to_int_with_if.rs:116:5
    |
 LL |     if a { 1 } else { 0 }
    |     ^^^^^^^^^^^^^^^^^^^^^ help: replace with from: `u8::from(a)`
    |
    = note: `a as u8` or `a.into()` can also be valid options
 
-error: aborting due to 7 previous errors
+error: aborting due to 9 previous errors
 
diff --git a/tests/ui/collapsible_if.fixed b/tests/ui/collapsible_if.fixed
index 5b0e4a473c4..6bb7682bae9 100644
--- a/tests/ui/collapsible_if.fixed
+++ b/tests/ui/collapsible_if.fixed
@@ -139,6 +139,9 @@ fn main() {
     // Fix #5962
     if matches!(true, true) && matches!(true, true) {}
 
+    // Issue #9375
+    if matches!(true, true) && truth() && matches!(true, true) {}
+
     if true {
         #[cfg(not(teehee))]
         if true {
diff --git a/tests/ui/collapsible_if.rs b/tests/ui/collapsible_if.rs
index cd231a5d7ab..e216a9ee54c 100644
--- a/tests/ui/collapsible_if.rs
+++ b/tests/ui/collapsible_if.rs
@@ -155,6 +155,11 @@ fn main() {
         if matches!(true, true) {}
     }
 
+    // Issue #9375
+    if matches!(true, true) && truth() {
+        if matches!(true, true) {}
+    }
+
     if true {
         #[cfg(not(teehee))]
         if true {
diff --git a/tests/ui/collapsible_if.stderr b/tests/ui/collapsible_if.stderr
index 6749612388f..6327444df21 100644
--- a/tests/ui/collapsible_if.stderr
+++ b/tests/ui/collapsible_if.stderr
@@ -126,5 +126,13 @@ LL | |         if matches!(true, true) {}
 LL | |     }
    | |_____^ help: collapse nested if block: `if matches!(true, true) && matches!(true, true) {}`
 
-error: aborting due to 8 previous errors
+error: this `if` statement can be collapsed
+  --> $DIR/collapsible_if.rs:159:5
+   |
+LL | /     if matches!(true, true) && truth() {
+LL | |         if matches!(true, true) {}
+LL | |     }
+   | |_____^ help: collapse nested if block: `if matches!(true, true) && truth() && matches!(true, true) {}`
+
+error: aborting due to 9 previous errors
 
diff --git a/tests/ui/crashes/ice-9463.rs b/tests/ui/crashes/ice-9463.rs
new file mode 100644
index 00000000000..41ef930d323
--- /dev/null
+++ b/tests/ui/crashes/ice-9463.rs
@@ -0,0 +1,5 @@
+#![deny(arithmetic_overflow, const_err)]
+fn main() {
+    let _x = -1_i32 >> -1;
+    let _y = 1u32 >> 10000000000000u32;
+}
diff --git a/tests/ui/crashes/ice-9463.stderr b/tests/ui/crashes/ice-9463.stderr
new file mode 100644
index 00000000000..7daa08aeb6c
--- /dev/null
+++ b/tests/ui/crashes/ice-9463.stderr
@@ -0,0 +1,29 @@
+error: this arithmetic operation will overflow
+  --> $DIR/ice-9463.rs:3:14
+   |
+LL |     let _x = -1_i32 >> -1;
+   |              ^^^^^^^^^^^^ attempt to shift right by `-1_i32`, which would overflow
+   |
+note: the lint level is defined here
+  --> $DIR/ice-9463.rs:1:9
+   |
+LL | #![deny(arithmetic_overflow, const_err)]
+   |         ^^^^^^^^^^^^^^^^^^^
+
+error: this arithmetic operation will overflow
+  --> $DIR/ice-9463.rs:4:14
+   |
+LL |     let _y = 1u32 >> 10000000000000u32;
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to shift right by `1316134912_u32`, which would overflow
+
+error: literal out of range for `u32`
+  --> $DIR/ice-9463.rs:4:22
+   |
+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`
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/derivable_impls.fixed b/tests/ui/derivable_impls.fixed
new file mode 100644
index 00000000000..7dcdfb0937e
--- /dev/null
+++ b/tests/ui/derivable_impls.fixed
@@ -0,0 +1,213 @@
+// run-rustfix
+
+#![allow(dead_code)]
+
+use std::collections::HashMap;
+
+#[derive(Default)]
+struct FooDefault<'a> {
+    a: bool,
+    b: i32,
+    c: u64,
+    d: Vec<i32>,
+    e: FooND1,
+    f: FooND2,
+    g: HashMap<i32, i32>,
+    h: (i32, Vec<i32>),
+    i: [Vec<i32>; 3],
+    j: [i32; 5],
+    k: Option<i32>,
+    l: &'a [i32],
+}
+
+
+
+#[derive(Default)]
+struct TupleDefault(bool, i32, u64);
+
+
+
+struct FooND1 {
+    a: bool,
+}
+
+impl std::default::Default for FooND1 {
+    fn default() -> Self {
+        Self { a: true }
+    }
+}
+
+struct FooND2 {
+    a: i32,
+}
+
+impl std::default::Default for FooND2 {
+    fn default() -> Self {
+        Self { a: 5 }
+    }
+}
+
+struct FooNDNew {
+    a: bool,
+}
+
+impl FooNDNew {
+    fn new() -> Self {
+        Self { a: true }
+    }
+}
+
+impl Default for FooNDNew {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
+struct FooNDVec(Vec<i32>);
+
+impl Default for FooNDVec {
+    fn default() -> Self {
+        Self(vec![5, 12])
+    }
+}
+
+#[derive(Default)]
+struct StrDefault<'a>(&'a str);
+
+
+
+#[derive(Default)]
+struct AlreadyDerived(i32, bool);
+
+macro_rules! mac {
+    () => {
+        0
+    };
+    ($e:expr) => {
+        struct X(u32);
+        impl Default for X {
+            fn default() -> Self {
+                Self($e)
+            }
+        }
+    };
+}
+
+mac!(0);
+
+#[derive(Default)]
+struct Y(u32);
+
+
+struct RustIssue26925<T> {
+    a: Option<T>,
+}
+
+// We should watch out for cases where a manual impl is needed because a
+// derive adds different type bounds (https://github.com/rust-lang/rust/issues/26925).
+// For example, a struct with Option<T> does not require T: Default, but a derive adds
+// that type bound anyways. So until #26925 get fixed we should disable lint
+// for the following case
+impl<T> Default for RustIssue26925<T> {
+    fn default() -> Self {
+        Self { a: None }
+    }
+}
+
+struct SpecializedImpl<A, B> {
+    a: A,
+    b: B,
+}
+
+impl<T: Default> Default for SpecializedImpl<T, T> {
+    fn default() -> Self {
+        Self {
+            a: T::default(),
+            b: T::default(),
+        }
+    }
+}
+
+#[derive(Default)]
+struct WithoutSelfCurly {
+    a: bool,
+}
+
+
+
+#[derive(Default)]
+struct WithoutSelfParan(bool);
+
+
+
+// https://github.com/rust-lang/rust-clippy/issues/7655
+
+pub struct SpecializedImpl2<T> {
+    v: Vec<T>,
+}
+
+impl Default for SpecializedImpl2<String> {
+    fn default() -> Self {
+        Self { v: Vec::new() }
+    }
+}
+
+// https://github.com/rust-lang/rust-clippy/issues/7654
+
+pub struct Color {
+    pub r: u8,
+    pub g: u8,
+    pub b: u8,
+}
+
+/// `#000000`
+impl Default for Color {
+    fn default() -> Self {
+        Color { r: 0, g: 0, b: 0 }
+    }
+}
+
+pub struct Color2 {
+    pub r: u8,
+    pub g: u8,
+    pub b: u8,
+}
+
+impl Default for Color2 {
+    /// `#000000`
+    fn default() -> Self {
+        Self { r: 0, g: 0, b: 0 }
+    }
+}
+
+#[derive(Default)]
+pub struct RepeatDefault1 {
+    a: [i8; 32],
+}
+
+
+
+pub struct RepeatDefault2 {
+    a: [i8; 33],
+}
+
+impl Default for RepeatDefault2 {
+    fn default() -> Self {
+        RepeatDefault2 { a: [0; 33] }
+    }
+}
+
+// https://github.com/rust-lang/rust-clippy/issues/7753
+
+pub enum IntOrString {
+    Int(i32),
+    String(String),
+}
+
+impl Default for IntOrString {
+    fn default() -> Self {
+        IntOrString::Int(0)
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/derivable_impls.rs b/tests/ui/derivable_impls.rs
index a6412004726..625cbcdde23 100644
--- a/tests/ui/derivable_impls.rs
+++ b/tests/ui/derivable_impls.rs
@@ -1,3 +1,7 @@
+// run-rustfix
+
+#![allow(dead_code)]
+
 use std::collections::HashMap;
 
 struct FooDefault<'a> {
diff --git a/tests/ui/derivable_impls.stderr b/tests/ui/derivable_impls.stderr
index 49fb471a219..c1db5a58b1f 100644
--- a/tests/ui/derivable_impls.stderr
+++ b/tests/ui/derivable_impls.stderr
@@ -1,5 +1,5 @@
 error: this `impl` can be derived
-  --> $DIR/derivable_impls.rs:18:1
+  --> $DIR/derivable_impls.rs:22:1
    |
 LL | / impl std::default::Default for FooDefault<'_> {
 LL | |     fn default() -> Self {
@@ -11,10 +11,14 @@ LL | | }
    | |_^
    |
    = note: `-D clippy::derivable-impls` implied by `-D warnings`
-   = help: try annotating `FooDefault` with `#[derive(Default)]`
+   = help: remove the manual implementation...
+help: ...and instead derive it
+   |
+LL | #[derive(Default)]
+   |
 
 error: this `impl` can be derived
-  --> $DIR/derivable_impls.rs:39:1
+  --> $DIR/derivable_impls.rs:43:1
    |
 LL | / impl std::default::Default for TupleDefault {
 LL | |     fn default() -> Self {
@@ -23,10 +27,14 @@ LL | |     }
 LL | | }
    | |_^
    |
-   = help: try annotating `TupleDefault` with `#[derive(Default)]`
+   = help: remove the manual implementation...
+help: ...and instead derive it
+   |
+LL | #[derive(Default)]
+   |
 
 error: this `impl` can be derived
-  --> $DIR/derivable_impls.rs:91:1
+  --> $DIR/derivable_impls.rs:95:1
    |
 LL | / impl Default for StrDefault<'_> {
 LL | |     fn default() -> Self {
@@ -35,10 +43,14 @@ LL | |     }
 LL | | }
    | |_^
    |
-   = help: try annotating `StrDefault` with `#[derive(Default)]`
+   = help: remove the manual implementation...
+help: ...and instead derive it
+   |
+LL | #[derive(Default)]
+   |
 
 error: this `impl` can be derived
-  --> $DIR/derivable_impls.rs:117:1
+  --> $DIR/derivable_impls.rs:121:1
    |
 LL | / impl Default for Y {
 LL | |     fn default() -> Self {
@@ -47,10 +59,14 @@ LL | |     }
 LL | | }
    | |_^
    |
-   = help: try annotating `Y` with `#[derive(Default)]`
+   = help: remove the manual implementation...
+help: ...and instead derive it
+   |
+LL | #[derive(Default)]
+   |
 
 error: this `impl` can be derived
-  --> $DIR/derivable_impls.rs:156:1
+  --> $DIR/derivable_impls.rs:160:1
    |
 LL | / impl Default for WithoutSelfCurly {
 LL | |     fn default() -> Self {
@@ -59,10 +75,14 @@ LL | |     }
 LL | | }
    | |_^
    |
-   = help: try annotating `WithoutSelfCurly` with `#[derive(Default)]`
+   = help: remove the manual implementation...
+help: ...and instead derive it
+   |
+LL | #[derive(Default)]
+   |
 
 error: this `impl` can be derived
-  --> $DIR/derivable_impls.rs:164:1
+  --> $DIR/derivable_impls.rs:168:1
    |
 LL | / impl Default for WithoutSelfParan {
 LL | |     fn default() -> Self {
@@ -71,10 +91,14 @@ LL | |     }
 LL | | }
    | |_^
    |
-   = help: try annotating `WithoutSelfParan` with `#[derive(Default)]`
+   = help: remove the manual implementation...
+help: ...and instead derive it
+   |
+LL | #[derive(Default)]
+   |
 
 error: this `impl` can be derived
-  --> $DIR/derivable_impls.rs:214:1
+  --> $DIR/derivable_impls.rs:218:1
    |
 LL | / impl Default for RepeatDefault1 {
 LL | |     fn default() -> Self {
@@ -83,7 +107,11 @@ LL | |     }
 LL | | }
    | |_^
    |
-   = help: try annotating `RepeatDefault1` with `#[derive(Default)]`
+   = help: remove the manual implementation...
+help: ...and instead derive it
+   |
+LL | #[derive(Default)]
+   |
 
 error: aborting due to 7 previous errors
 
diff --git a/tests/ui/eprint_with_newline.rs b/tests/ui/eprint_with_newline.rs
index 8df32649ad9..de5e121be87 100644
--- a/tests/ui/eprint_with_newline.rs
+++ b/tests/ui/eprint_with_newline.rs
@@ -45,5 +45,13 @@ fn main() {
     eprint!("\r\n");
     eprint!("foo\r\n");
     eprint!("\\r\n"); //~ ERROR
-    eprint!("foo\rbar\n") // ~ ERROR
+    eprint!("foo\rbar\n");
+
+    // Ignore expanded format strings
+    macro_rules! newline {
+        () => {
+            "\n"
+        };
+    }
+    eprint!(newline!());
 }
diff --git a/tests/ui/eprint_with_newline.stderr b/tests/ui/eprint_with_newline.stderr
index f137787bff0..0eefb9f0ca9 100644
--- a/tests/ui/eprint_with_newline.stderr
+++ b/tests/ui/eprint_with_newline.stderr
@@ -83,7 +83,7 @@ LL | |     );
 help: use `eprintln!` instead
    |
 LL ~     eprintln!(
-LL ~         ""
+LL ~         
    |
 
 error: using `eprint!()` with a format string that ends in a single newline
@@ -98,7 +98,7 @@ LL | |     );
 help: use `eprintln!` instead
    |
 LL ~     eprintln!(
-LL ~         r""
+LL ~         
    |
 
 error: using `eprint!()` with a format string that ends in a single newline
@@ -113,17 +113,5 @@ LL -     eprint!("/r/n"); //~ ERROR
 LL +     eprintln!("/r"); //~ ERROR
    |
 
-error: using `eprint!()` with a format string that ends in a single newline
-  --> $DIR/eprint_with_newline.rs:48:5
-   |
-LL |     eprint!("foo/rbar/n") // ~ ERROR
-   |     ^^^^^^^^^^^^^^^^^^^^^
-   |
-help: use `eprintln!` instead
-   |
-LL -     eprint!("foo/rbar/n") // ~ ERROR
-LL +     eprintln!("foo/rbar") // ~ ERROR
-   |
-
-error: aborting due to 10 previous errors
+error: aborting due to 9 previous errors
 
diff --git a/tests/ui/explicit_write.fixed b/tests/ui/explicit_write.fixed
index 74d0e529028..35283725619 100644
--- a/tests/ui/explicit_write.fixed
+++ b/tests/ui/explicit_write.fixed
@@ -36,6 +36,8 @@ fn main() {
         eprintln!("with {} {}", 2, value);
         eprintln!("with {value}");
         eprintln!("macro arg {}", one!());
+        let width = 2;
+        eprintln!("{:w$}", value, w = width);
     }
     // these should not warn, different destination
     {
diff --git a/tests/ui/explicit_write.rs b/tests/ui/explicit_write.rs
index e7a698d3e01..be864a55b66 100644
--- a/tests/ui/explicit_write.rs
+++ b/tests/ui/explicit_write.rs
@@ -36,6 +36,8 @@ fn main() {
         writeln!(std::io::stderr(), "with {} {}", 2, value).unwrap();
         writeln!(std::io::stderr(), "with {value}").unwrap();
         writeln!(std::io::stderr(), "macro arg {}", one!()).unwrap();
+        let width = 2;
+        writeln!(std::io::stderr(), "{:w$}", value, w = width).unwrap();
     }
     // these should not warn, different destination
     {
diff --git a/tests/ui/explicit_write.stderr b/tests/ui/explicit_write.stderr
index 29ae0cdece2..ff05f4343d7 100644
--- a/tests/ui/explicit_write.stderr
+++ b/tests/ui/explicit_write.stderr
@@ -72,5 +72,11 @@ error: use of `writeln!(stderr(), ...).unwrap()`
 LL |         writeln!(std::io::stderr(), "macro arg {}", one!()).unwrap();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `eprintln!("macro arg {}", one!())`
 
-error: aborting due to 12 previous errors
+error: use of `writeln!(stderr(), ...).unwrap()`
+  --> $DIR/explicit_write.rs:40:9
+   |
+LL |         writeln!(std::io::stderr(), "{:w$}", value, w = width).unwrap();
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `eprintln!("{:w$}", value, w = width)`
+
+error: aborting due to 13 previous errors
 
diff --git a/tests/ui/format.fixed b/tests/ui/format.fixed
index b56d6aec508..e0c5f692740 100644
--- a/tests/ui/format.fixed
+++ b/tests/ui/format.fixed
@@ -28,8 +28,6 @@ fn main() {
     format!("{:?}", "foo"); // Don't warn about `Debug`.
     format!("{:8}", "foo");
     format!("{:width$}", "foo", width = 8);
-    "foo".to_string(); // Warn when the format makes no difference.
-    "foo".to_string(); // Warn when the format makes no difference.
     format!("foo {}", "bar");
     format!("{} bar", "foo");
 
@@ -38,8 +36,6 @@ fn main() {
     format!("{:?}", arg); // Don't warn about debug.
     format!("{:8}", arg);
     format!("{:width$}", arg, width = 8);
-    arg.to_string(); // Warn when the format makes no difference.
-    arg.to_string(); // Warn when the format makes no difference.
     format!("foo {}", arg);
     format!("{} bar", arg);
 
diff --git a/tests/ui/format.rs b/tests/ui/format.rs
index 4c1a3a840ed..ff83cd64bf0 100644
--- a/tests/ui/format.rs
+++ b/tests/ui/format.rs
@@ -30,8 +30,6 @@ fn main() {
     format!("{:?}", "foo"); // Don't warn about `Debug`.
     format!("{:8}", "foo");
     format!("{:width$}", "foo", width = 8);
-    format!("{:+}", "foo"); // Warn when the format makes no difference.
-    format!("{:<}", "foo"); // Warn when the format makes no difference.
     format!("foo {}", "bar");
     format!("{} bar", "foo");
 
@@ -40,8 +38,6 @@ fn main() {
     format!("{:?}", arg); // Don't warn about debug.
     format!("{:8}", arg);
     format!("{:width$}", arg, width = 8);
-    format!("{:+}", arg); // Warn when the format makes no difference.
-    format!("{:<}", arg); // Warn when the format makes no difference.
     format!("foo {}", arg);
     format!("{} bar", arg);
 
diff --git a/tests/ui/format.stderr b/tests/ui/format.stderr
index 6c35caeb034..0ef0ac655d3 100644
--- a/tests/ui/format.stderr
+++ b/tests/ui/format.stderr
@@ -46,82 +46,58 @@ LL |     format!("{}", "foo");
    |     ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
 
 error: useless use of `format!`
-  --> $DIR/format.rs:33:5
-   |
-LL |     format!("{:+}", "foo"); // Warn when the format makes no difference.
-   |     ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
-
-error: useless use of `format!`
-  --> $DIR/format.rs:34:5
-   |
-LL |     format!("{:<}", "foo"); // Warn when the format makes no difference.
-   |     ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
-
-error: useless use of `format!`
-  --> $DIR/format.rs:39:5
+  --> $DIR/format.rs:37:5
    |
 LL |     format!("{}", arg);
    |     ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
 
 error: useless use of `format!`
-  --> $DIR/format.rs:43:5
-   |
-LL |     format!("{:+}", arg); // Warn when the format makes no difference.
-   |     ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
-
-error: useless use of `format!`
-  --> $DIR/format.rs:44:5
-   |
-LL |     format!("{:<}", arg); // Warn when the format makes no difference.
-   |     ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
-
-error: useless use of `format!`
-  --> $DIR/format.rs:71:5
+  --> $DIR/format.rs:67:5
    |
 LL |     format!("{}", 42.to_string());
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `42.to_string()`
 
 error: useless use of `format!`
-  --> $DIR/format.rs:73:5
+  --> $DIR/format.rs:69:5
    |
 LL |     format!("{}", x.display().to_string());
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.display().to_string()`
 
 error: useless use of `format!`
-  --> $DIR/format.rs:77:18
+  --> $DIR/format.rs:73:18
    |
 LL |     let _ = Some(format!("{}", a + "bar"));
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `a + "bar"`
 
 error: useless use of `format!`
-  --> $DIR/format.rs:81:22
+  --> $DIR/format.rs:77:22
    |
 LL |     let _s: String = format!("{}", &*v.join("/n"));
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&*v.join("/n")).to_string()`
 
 error: useless use of `format!`
-  --> $DIR/format.rs:87:13
+  --> $DIR/format.rs:83:13
    |
 LL |     let _ = format!("{x}");
    |             ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
 
 error: useless use of `format!`
-  --> $DIR/format.rs:89:13
+  --> $DIR/format.rs:85:13
    |
 LL |     let _ = format!("{y}", y = x);
    |             ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
 
 error: useless use of `format!`
-  --> $DIR/format.rs:93:13
+  --> $DIR/format.rs:89:13
    |
 LL |     let _ = format!("{abc}");
    |             ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `abc.to_string()`
 
 error: useless use of `format!`
-  --> $DIR/format.rs:95:13
+  --> $DIR/format.rs:91:13
    |
 LL |     let _ = format!("{xx}");
    |             ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `xx.to_string()`
 
-error: aborting due to 19 previous errors
+error: aborting due to 15 previous errors
 
diff --git a/tests/ui/iter_kv_map.fixed b/tests/ui/iter_kv_map.fixed
new file mode 100644
index 00000000000..83fee04080f
--- /dev/null
+++ b/tests/ui/iter_kv_map.fixed
@@ -0,0 +1,64 @@
+// run-rustfix
+
+#![warn(clippy::iter_kv_map)]
+#![allow(clippy::redundant_clone)]
+#![allow(clippy::suspicious_map)]
+#![allow(clippy::map_identity)]
+
+use std::collections::{BTreeMap, HashMap};
+
+fn main() {
+    let get_key = |(key, _val)| key;
+
+    let map: HashMap<u32, u32> = HashMap::new();
+
+    let _ = map.keys().collect::<Vec<_>>();
+    let _ = map.values().collect::<Vec<_>>();
+    let _ = map.values().map(|v| v + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().into_keys().collect::<Vec<_>>();
+    let _ = map.clone().into_keys().map(|key| key + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().into_values().collect::<Vec<_>>();
+    let _ = map.clone().into_values().map(|val| val + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().values().collect::<Vec<_>>();
+    let _ = map.keys().filter(|x| *x % 2 == 0).count();
+
+    // Don't lint
+    let _ = map.iter().filter(|(_, val)| *val % 2 == 0).map(|(key, _)| key).count();
+    let _ = map.iter().map(get_key).collect::<Vec<_>>();
+
+    // Linting the following could be an improvement to the lint
+    // map.iter().filter_map(|(_, val)| (val % 2 == 0).then(val * 17)).count();
+
+    // Lint
+    let _ = map.keys().map(|key| key * 9).count();
+    let _ = map.values().map(|value| value * 17).count();
+
+    let map: BTreeMap<u32, u32> = BTreeMap::new();
+
+    let _ = map.keys().collect::<Vec<_>>();
+    let _ = map.values().collect::<Vec<_>>();
+    let _ = map.values().map(|v| v + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().into_keys().collect::<Vec<_>>();
+    let _ = map.clone().into_keys().map(|key| key + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().into_values().collect::<Vec<_>>();
+    let _ = map.clone().into_values().map(|val| val + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().values().collect::<Vec<_>>();
+    let _ = map.keys().filter(|x| *x % 2 == 0).count();
+
+    // Don't lint
+    let _ = map.iter().filter(|(_, val)| *val % 2 == 0).map(|(key, _)| key).count();
+    let _ = map.iter().map(get_key).collect::<Vec<_>>();
+
+    // Linting the following could be an improvement to the lint
+    // map.iter().filter_map(|(_, val)| (val % 2 == 0).then(val * 17)).count();
+
+    // Lint
+    let _ = map.keys().map(|key| key * 9).count();
+    let _ = map.values().map(|value| value * 17).count();
+}
diff --git a/tests/ui/iter_kv_map.rs b/tests/ui/iter_kv_map.rs
new file mode 100644
index 00000000000..7a1f1fb0198
--- /dev/null
+++ b/tests/ui/iter_kv_map.rs
@@ -0,0 +1,64 @@
+// run-rustfix
+
+#![warn(clippy::iter_kv_map)]
+#![allow(clippy::redundant_clone)]
+#![allow(clippy::suspicious_map)]
+#![allow(clippy::map_identity)]
+
+use std::collections::{BTreeMap, HashMap};
+
+fn main() {
+    let get_key = |(key, _val)| key;
+
+    let map: HashMap<u32, u32> = HashMap::new();
+
+    let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
+    let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
+    let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
+    let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
+    let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
+    let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
+
+    // Don't lint
+    let _ = map.iter().filter(|(_, val)| *val % 2 == 0).map(|(key, _)| key).count();
+    let _ = map.iter().map(get_key).collect::<Vec<_>>();
+
+    // Linting the following could be an improvement to the lint
+    // map.iter().filter_map(|(_, val)| (val % 2 == 0).then(val * 17)).count();
+
+    // Lint
+    let _ = map.iter().map(|(key, _value)| key * 9).count();
+    let _ = map.iter().map(|(_key, value)| value * 17).count();
+
+    let map: BTreeMap<u32, u32> = BTreeMap::new();
+
+    let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
+    let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
+    let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
+    let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
+    let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
+
+    let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
+    let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
+
+    // Don't lint
+    let _ = map.iter().filter(|(_, val)| *val % 2 == 0).map(|(key, _)| key).count();
+    let _ = map.iter().map(get_key).collect::<Vec<_>>();
+
+    // Linting the following could be an improvement to the lint
+    // map.iter().filter_map(|(_, val)| (val % 2 == 0).then(val * 17)).count();
+
+    // Lint
+    let _ = map.iter().map(|(key, _value)| key * 9).count();
+    let _ = map.iter().map(|(_key, value)| value * 17).count();
+}
diff --git a/tests/ui/iter_kv_map.stderr b/tests/ui/iter_kv_map.stderr
new file mode 100644
index 00000000000..9b9b04c97d8
--- /dev/null
+++ b/tests/ui/iter_kv_map.stderr
@@ -0,0 +1,136 @@
+error: iterating on a map's keys
+  --> $DIR/iter_kv_map.rs:15:13
+   |
+LL |     let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
+   |
+   = note: `-D clippy::iter-kv-map` implied by `-D warnings`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:16:13
+   |
+LL |     let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:17:13
+   |
+LL |     let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`
+
+error: iterating on a map's keys
+  --> $DIR/iter_kv_map.rs:19:13
+   |
+LL |     let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
+
+error: iterating on a map's keys
+  --> $DIR/iter_kv_map.rs:20:13
+   |
+LL |     let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:22:13
+   |
+LL |     let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:23:13
+   |
+LL |     let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:25:13
+   |
+LL |     let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`
+
+error: iterating on a map's keys
+  --> $DIR/iter_kv_map.rs:26:13
+   |
+LL |     let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
+
+error: iterating on a map's keys
+  --> $DIR/iter_kv_map.rs:36:13
+   |
+LL |     let _ = map.iter().map(|(key, _value)| key * 9).count();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:37:13
+   |
+LL |     let _ = map.iter().map(|(_key, value)| value * 17).count();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`
+
+error: iterating on a map's keys
+  --> $DIR/iter_kv_map.rs:41:13
+   |
+LL |     let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:42:13
+   |
+LL |     let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:43:13
+   |
+LL |     let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`
+
+error: iterating on a map's keys
+  --> $DIR/iter_kv_map.rs:45:13
+   |
+LL |     let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
+
+error: iterating on a map's keys
+  --> $DIR/iter_kv_map.rs:46:13
+   |
+LL |     let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:48:13
+   |
+LL |     let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:49:13
+   |
+LL |     let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:51:13
+   |
+LL |     let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`
+
+error: iterating on a map's keys
+  --> $DIR/iter_kv_map.rs:52:13
+   |
+LL |     let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
+
+error: iterating on a map's keys
+  --> $DIR/iter_kv_map.rs:62:13
+   |
+LL |     let _ = map.iter().map(|(key, _value)| key * 9).count();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`
+
+error: iterating on a map's values
+  --> $DIR/iter_kv_map.rs:63:13
+   |
+LL |     let _ = map.iter().map(|(_key, value)| value * 17).count();
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`
+
+error: aborting due to 22 previous errors
+
diff --git a/tests/ui/large_enum_variant.rs b/tests/ui/large_enum_variant.rs
index 717009e4c4c..3b96f09d7b1 100644
--- a/tests/ui/large_enum_variant.rs
+++ b/tests/ui/large_enum_variant.rs
@@ -101,12 +101,12 @@ struct Struct2 {
 #[derive(Copy, Clone)]
 enum CopyableLargeEnum {
     A(bool),
-    B([u128; 4000]),
+    B([u64; 8000]),
 }
 
 enum ManuallyCopyLargeEnum {
     A(bool),
-    B([u128; 4000]),
+    B([u64; 8000]),
 }
 
 impl Clone for ManuallyCopyLargeEnum {
diff --git a/tests/ui/large_enum_variant.stderr b/tests/ui/large_enum_variant.stderr
index c6ed97487c0..709972b4a6e 100644
--- a/tests/ui/large_enum_variant.stderr
+++ b/tests/ui/large_enum_variant.stderr
@@ -167,8 +167,8 @@ error: large size difference between variants
 LL | / enum CopyableLargeEnum {
 LL | |     A(bool),
    | |     ------- the second-largest variant contains at least 1 bytes
-LL | |     B([u128; 4000]),
-   | |     --------------- the largest variant contains at least 64000 bytes
+LL | |     B([u64; 8000]),
+   | |     -------------- the largest variant contains at least 64000 bytes
 LL | | }
    | |_^ the entire enum is at least 64008 bytes
    |
@@ -180,8 +180,8 @@ LL | enum CopyableLargeEnum {
 help: consider boxing the large fields to reduce the total size of the enum
   --> $DIR/large_enum_variant.rs:104:5
    |
-LL |     B([u128; 4000]),
-   |     ^^^^^^^^^^^^^^^
+LL |     B([u64; 8000]),
+   |     ^^^^^^^^^^^^^^
 
 error: large size difference between variants
   --> $DIR/large_enum_variant.rs:107:1
@@ -189,8 +189,8 @@ error: large size difference between variants
 LL | / enum ManuallyCopyLargeEnum {
 LL | |     A(bool),
    | |     ------- the second-largest variant contains at least 1 bytes
-LL | |     B([u128; 4000]),
-   | |     --------------- the largest variant contains at least 64000 bytes
+LL | |     B([u64; 8000]),
+   | |     -------------- the largest variant contains at least 64000 bytes
 LL | | }
    | |_^ the entire enum is at least 64008 bytes
    |
@@ -202,8 +202,8 @@ LL | enum ManuallyCopyLargeEnum {
 help: consider boxing the large fields to reduce the total size of the enum
   --> $DIR/large_enum_variant.rs:109:5
    |
-LL |     B([u128; 4000]),
-   |     ^^^^^^^^^^^^^^^
+LL |     B([u64; 8000]),
+   |     ^^^^^^^^^^^^^^
 
 error: large size difference between variants
   --> $DIR/large_enum_variant.rs:120:1
diff --git a/tests/ui/large_stack_arrays.rs b/tests/ui/large_stack_arrays.rs
index d9161bfcf15..6790765f803 100644
--- a/tests/ui/large_stack_arrays.rs
+++ b/tests/ui/large_stack_arrays.rs
@@ -12,6 +12,12 @@ enum E {
     T(u32),
 }
 
+pub static DOESNOTLINT: [u8; 512_001] = [0; 512_001];
+pub static DOESNOTLINT2: [u8; 512_001] = {
+    let x = 0;
+    [x; 512_001]
+};
+
 fn main() {
     let bad = (
         [0u32; 20_000_000],
diff --git a/tests/ui/large_stack_arrays.stderr b/tests/ui/large_stack_arrays.stderr
index 58c0a77c1c8..0d91b65b428 100644
--- a/tests/ui/large_stack_arrays.stderr
+++ b/tests/ui/large_stack_arrays.stderr
@@ -1,5 +1,5 @@
 error: allocating a local array larger than 512000 bytes
-  --> $DIR/large_stack_arrays.rs:17:9
+  --> $DIR/large_stack_arrays.rs:23:9
    |
 LL |         [0u32; 20_000_000],
    |         ^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL |         [0u32; 20_000_000],
    = help: consider allocating on the heap with `vec![0u32; 20_000_000].into_boxed_slice()`
 
 error: allocating a local array larger than 512000 bytes
-  --> $DIR/large_stack_arrays.rs:18:9
+  --> $DIR/large_stack_arrays.rs:24:9
    |
 LL |         [S { data: [0; 32] }; 5000],
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -16,7 +16,7 @@ LL |         [S { data: [0; 32] }; 5000],
    = help: consider allocating on the heap with `vec![S { data: [0; 32] }; 5000].into_boxed_slice()`
 
 error: allocating a local array larger than 512000 bytes
-  --> $DIR/large_stack_arrays.rs:19:9
+  --> $DIR/large_stack_arrays.rs:25:9
    |
 LL |         [Some(""); 20_000_000],
    |         ^^^^^^^^^^^^^^^^^^^^^^
@@ -24,7 +24,7 @@ LL |         [Some(""); 20_000_000],
    = help: consider allocating on the heap with `vec![Some(""); 20_000_000].into_boxed_slice()`
 
 error: allocating a local array larger than 512000 bytes
-  --> $DIR/large_stack_arrays.rs:20:9
+  --> $DIR/large_stack_arrays.rs:26:9
    |
 LL |         [E::T(0); 5000],
    |         ^^^^^^^^^^^^^^^
diff --git a/tests/ui/len_without_is_empty.rs b/tests/ui/len_without_is_empty.rs
index 1e938e72b57..78397c2af34 100644
--- a/tests/ui/len_without_is_empty.rs
+++ b/tests/ui/len_without_is_empty.rs
@@ -274,7 +274,7 @@ impl AsyncLen {
     }
 
     pub async fn len(&self) -> usize {
-        if self.async_task().await { 0 } else { 1 }
+        usize::from(!self.async_task().await)
     }
 
     pub async fn is_empty(&self) -> bool {
diff --git a/tests/ui/nonminimal_bool.rs b/tests/ui/nonminimal_bool.rs
index 24ae62bb058..e9b4367ca65 100644
--- a/tests/ui/nonminimal_bool.rs
+++ b/tests/ui/nonminimal_bool.rs
@@ -57,3 +57,9 @@ fn check_expect() {
     #[expect(clippy::nonminimal_bool)]
     let _ = !!a;
 }
+
+fn issue9428() {
+    if matches!(true, true) && true {
+        println!("foo");
+    }
+}
diff --git a/tests/ui/nonminimal_bool.stderr b/tests/ui/nonminimal_bool.stderr
index fc6a5ce1dc2..91b5805aa97 100644
--- a/tests/ui/nonminimal_bool.stderr
+++ b/tests/ui/nonminimal_bool.stderr
@@ -107,5 +107,11 @@ LL |     let _ = !(a == b || c == d);
 LL |     let _ = a != b && c != d;
    |             ~~~~~~~~~~~~~~~~
 
-error: aborting due to 12 previous errors
+error: this boolean expression can be simplified
+  --> $DIR/nonminimal_bool.rs:62:8
+   |
+LL |     if matches!(true, true) && true {
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches!(true, true)`
+
+error: aborting due to 13 previous errors
 
diff --git a/tests/ui/positional_named_format_parameters.fixed b/tests/ui/positional_named_format_parameters.fixed
deleted file mode 100644
index 4170e109820..00000000000
--- a/tests/ui/positional_named_format_parameters.fixed
+++ /dev/null
@@ -1,56 +0,0 @@
-// run-rustfix
-#![allow(unused_must_use)]
-#![allow(named_arguments_used_positionally)] // Unstable at time of writing.
-#![warn(clippy::positional_named_format_parameters)]
-
-use std::io::Write;
-
-fn main() {
-    let mut v = Vec::new();
-    let hello = "Hello";
-
-    println!("{hello:.foo$}", foo = 2);
-    writeln!(v, "{hello:.foo$}", foo = 2);
-
-    // Warnings
-    println!("{zero} {one:?}", zero = 0, one = 1);
-    println!("This is a test {zero} {one:?}", zero = 0, one = 1);
-    println!("Hello {one} is {two:.zero$}", zero = 5, one = hello, two = 0.01);
-    println!("Hello {one:zero$}!", zero = 5, one = 1);
-    println!("Hello {zero:one$}!", zero = 4, one = 1);
-    println!("Hello {zero:0one$}!", zero = 4, one = 1);
-    println!("Hello is {one:.zero$}", zero = 5, one = 0.01);
-    println!("Hello is {one:<6.zero$}", zero = 5, one = 0.01);
-    println!("{zero}, `{two:>8.one$}` has 3", zero = hello, one = 3, two = hello);
-    println!("Hello {one} is {two:.zero$}", zero = 5, one = hello, two = 0.01);
-    println!("Hello {world} {world}!", world = 5);
-
-    writeln!(v, "{zero} {one:?}", zero = 0, one = 1);
-    writeln!(v, "This is a test {zero} {one:?}", zero = 0, one = 1);
-    writeln!(v, "Hello {one} is {two:.zero$}", zero = 5, one = hello, two = 0.01);
-    writeln!(v, "Hello {one:zero$}!", zero = 4, one = 1);
-    writeln!(v, "Hello {zero:one$}!", zero = 4, one = 1);
-    writeln!(v, "Hello {zero:0one$}!", zero = 4, one = 1);
-    writeln!(v, "Hello is {one:.zero$}", zero = 3, one = 0.01);
-    writeln!(v, "Hello is {one:<6.zero$}", zero = 2, one = 0.01);
-    writeln!(v, "{zero}, `{two:>8.one$}` has 3", zero = hello, one = 3, two = hello);
-    writeln!(v, "Hello {one} is {two:.zero$}", zero = 1, one = hello, two = 0.01);
-    writeln!(v, "Hello {world} {world}!", world = 0);
-
-    // Tests from other files
-    println!("{w:w$}", w = 1);
-    println!("{p:.p$}", p = 1);
-    println!("{v}", v = 1);
-    println!("{v:v$}", v = 1);
-    println!("{v:v$}", v = 1);
-    println!("{v:v$.v$}", v = 1);
-    println!("{v:v$.v$}", v = 1);
-    println!("{v:v$.v$}", v = 1);
-    println!("{v:v$.v$}", v = 1);
-    println!("{v:v$.v$}", v = 1);
-    println!("{v:v$.v$}", v = 1);
-    println!("{v:v$.v$}", v = 1);
-    println!("{w:w$}", w = 1);
-    println!("{p:.p$}", p = 1);
-    println!("{:p$.w$}", 1, w = 1, p = 1);
-}
diff --git a/tests/ui/positional_named_format_parameters.rs b/tests/ui/positional_named_format_parameters.rs
deleted file mode 100644
index 553d8494ecc..00000000000
--- a/tests/ui/positional_named_format_parameters.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-// run-rustfix
-#![allow(unused_must_use)]
-#![allow(named_arguments_used_positionally)] // Unstable at time of writing.
-#![warn(clippy::positional_named_format_parameters)]
-
-use std::io::Write;
-
-fn main() {
-    let mut v = Vec::new();
-    let hello = "Hello";
-
-    println!("{hello:.foo$}", foo = 2);
-    writeln!(v, "{hello:.foo$}", foo = 2);
-
-    // Warnings
-    println!("{} {1:?}", zero = 0, one = 1);
-    println!("This is a test { } {000001:?}", zero = 0, one = 1);
-    println!("Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-    println!("Hello {1:0$}!", zero = 5, one = 1);
-    println!("Hello {0:1$}!", zero = 4, one = 1);
-    println!("Hello {0:01$}!", zero = 4, one = 1);
-    println!("Hello is {1:.*}", zero = 5, one = 0.01);
-    println!("Hello is {:<6.*}", zero = 5, one = 0.01);
-    println!("{}, `{two:>8.*}` has 3", zero = hello, one = 3, two = hello);
-    println!("Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-    println!("Hello {world} {}!", world = 5);
-
-    writeln!(v, "{} {1:?}", zero = 0, one = 1);
-    writeln!(v, "This is a test { } {000001:?}", zero = 0, one = 1);
-    writeln!(v, "Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-    writeln!(v, "Hello {1:0$}!", zero = 4, one = 1);
-    writeln!(v, "Hello {0:1$}!", zero = 4, one = 1);
-    writeln!(v, "Hello {0:01$}!", zero = 4, one = 1);
-    writeln!(v, "Hello is {1:.*}", zero = 3, one = 0.01);
-    writeln!(v, "Hello is {:<6.*}", zero = 2, one = 0.01);
-    writeln!(v, "{}, `{two:>8.*}` has 3", zero = hello, one = 3, two = hello);
-    writeln!(v, "Hello {1} is {2:.0$}", zero = 1, one = hello, two = 0.01);
-    writeln!(v, "Hello {world} {}!", world = 0);
-
-    // Tests from other files
-    println!("{:w$}", w = 1);
-    println!("{:.p$}", p = 1);
-    println!("{}", v = 1);
-    println!("{:0$}", v = 1);
-    println!("{0:0$}", v = 1);
-    println!("{:0$.0$}", v = 1);
-    println!("{0:0$.0$}", v = 1);
-    println!("{0:0$.v$}", v = 1);
-    println!("{0:v$.0$}", v = 1);
-    println!("{v:0$.0$}", v = 1);
-    println!("{v:v$.0$}", v = 1);
-    println!("{v:0$.v$}", v = 1);
-    println!("{:w$}", w = 1);
-    println!("{:.p$}", p = 1);
-    println!("{:p$.w$}", 1, w = 1, p = 1);
-}
diff --git a/tests/ui/positional_named_format_parameters.stderr b/tests/ui/positional_named_format_parameters.stderr
deleted file mode 100644
index 48ddb6d67ad..00000000000
--- a/tests/ui/positional_named_format_parameters.stderr
+++ /dev/null
@@ -1,418 +0,0 @@
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:16:16
-   |
-LL |     println!("{} {1:?}", zero = 0, one = 1);
-   |                ^ help: replace it with: `zero`
-   |
-   = note: `-D clippy::positional-named-format-parameters` implied by `-D warnings`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:16:19
-   |
-LL |     println!("{} {1:?}", zero = 0, one = 1);
-   |                   ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:17:31
-   |
-LL |     println!("This is a test { } {000001:?}", zero = 0, one = 1);
-   |                               ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:17:35
-   |
-LL |     println!("This is a test { } {000001:?}", zero = 0, one = 1);
-   |                                   ^^^^^^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:18:32
-   |
-LL |     println!("Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-   |                                ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:18:22
-   |
-LL |     println!("Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-   |                      ^ help: replace it with: `one`
-
-error: named parameter two is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:18:29
-   |
-LL |     println!("Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-   |                             ^ help: replace it with: `two`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:19:24
-   |
-LL |     println!("Hello {1:0$}!", zero = 5, one = 1);
-   |                        ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:19:22
-   |
-LL |     println!("Hello {1:0$}!", zero = 5, one = 1);
-   |                      ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:20:22
-   |
-LL |     println!("Hello {0:1$}!", zero = 4, one = 1);
-   |                      ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:20:24
-   |
-LL |     println!("Hello {0:1$}!", zero = 4, one = 1);
-   |                        ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:21:22
-   |
-LL |     println!("Hello {0:01$}!", zero = 4, one = 1);
-   |                      ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:21:25
-   |
-LL |     println!("Hello {0:01$}!", zero = 4, one = 1);
-   |                         ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:22:28
-   |
-LL |     println!("Hello is {1:.*}", zero = 5, one = 0.01);
-   |                            ^ help: replace it with: `zero$`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:22:25
-   |
-LL |     println!("Hello is {1:.*}", zero = 5, one = 0.01);
-   |                         ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:23:29
-   |
-LL |     println!("Hello is {:<6.*}", zero = 5, one = 0.01);
-   |                             ^ help: replace it with: `zero$`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:23:25
-   |
-LL |     println!("Hello is {:<6.*}", zero = 5, one = 0.01);
-   |                         ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:24:16
-   |
-LL |     println!("{}, `{two:>8.*}` has 3", zero = hello, one = 3, two = hello);
-   |                ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:24:28
-   |
-LL |     println!("{}, `{two:>8.*}` has 3", zero = hello, one = 3, two = hello);
-   |                            ^ help: replace it with: `one$`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:25:32
-   |
-LL |     println!("Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-   |                                ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:25:22
-   |
-LL |     println!("Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-   |                      ^ help: replace it with: `one`
-
-error: named parameter two is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:25:29
-   |
-LL |     println!("Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-   |                             ^ help: replace it with: `two`
-
-error: named parameter world is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:26:30
-   |
-LL |     println!("Hello {world} {}!", world = 5);
-   |                              ^ help: replace it with: `world`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:28:19
-   |
-LL |     writeln!(v, "{} {1:?}", zero = 0, one = 1);
-   |                   ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:28:22
-   |
-LL |     writeln!(v, "{} {1:?}", zero = 0, one = 1);
-   |                      ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:29:34
-   |
-LL |     writeln!(v, "This is a test { } {000001:?}", zero = 0, one = 1);
-   |                                  ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:29:38
-   |
-LL |     writeln!(v, "This is a test { } {000001:?}", zero = 0, one = 1);
-   |                                      ^^^^^^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:30:35
-   |
-LL |     writeln!(v, "Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-   |                                   ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:30:25
-   |
-LL |     writeln!(v, "Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-   |                         ^ help: replace it with: `one`
-
-error: named parameter two is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:30:32
-   |
-LL |     writeln!(v, "Hello {1} is {2:.0$}", zero = 5, one = hello, two = 0.01);
-   |                                ^ help: replace it with: `two`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:31:27
-   |
-LL |     writeln!(v, "Hello {1:0$}!", zero = 4, one = 1);
-   |                           ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:31:25
-   |
-LL |     writeln!(v, "Hello {1:0$}!", zero = 4, one = 1);
-   |                         ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:32:25
-   |
-LL |     writeln!(v, "Hello {0:1$}!", zero = 4, one = 1);
-   |                         ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:32:27
-   |
-LL |     writeln!(v, "Hello {0:1$}!", zero = 4, one = 1);
-   |                           ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:33:25
-   |
-LL |     writeln!(v, "Hello {0:01$}!", zero = 4, one = 1);
-   |                         ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:33:28
-   |
-LL |     writeln!(v, "Hello {0:01$}!", zero = 4, one = 1);
-   |                            ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:34:31
-   |
-LL |     writeln!(v, "Hello is {1:.*}", zero = 3, one = 0.01);
-   |                               ^ help: replace it with: `zero$`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:34:28
-   |
-LL |     writeln!(v, "Hello is {1:.*}", zero = 3, one = 0.01);
-   |                            ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:35:32
-   |
-LL |     writeln!(v, "Hello is {:<6.*}", zero = 2, one = 0.01);
-   |                                ^ help: replace it with: `zero$`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:35:28
-   |
-LL |     writeln!(v, "Hello is {:<6.*}", zero = 2, one = 0.01);
-   |                            ^ help: replace it with: `one`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:36:19
-   |
-LL |     writeln!(v, "{}, `{two:>8.*}` has 3", zero = hello, one = 3, two = hello);
-   |                   ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:36:31
-   |
-LL |     writeln!(v, "{}, `{two:>8.*}` has 3", zero = hello, one = 3, two = hello);
-   |                               ^ help: replace it with: `one$`
-
-error: named parameter zero is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:37:35
-   |
-LL |     writeln!(v, "Hello {1} is {2:.0$}", zero = 1, one = hello, two = 0.01);
-   |                                   ^ help: replace it with: `zero`
-
-error: named parameter one is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:37:25
-   |
-LL |     writeln!(v, "Hello {1} is {2:.0$}", zero = 1, one = hello, two = 0.01);
-   |                         ^ help: replace it with: `one`
-
-error: named parameter two is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:37:32
-   |
-LL |     writeln!(v, "Hello {1} is {2:.0$}", zero = 1, one = hello, two = 0.01);
-   |                                ^ help: replace it with: `two`
-
-error: named parameter world is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:38:33
-   |
-LL |     writeln!(v, "Hello {world} {}!", world = 0);
-   |                                 ^ help: replace it with: `world`
-
-error: named parameter w is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:41:16
-   |
-LL |     println!("{:w$}", w = 1);
-   |                ^ help: replace it with: `w`
-
-error: named parameter p is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:42:16
-   |
-LL |     println!("{:.p$}", p = 1);
-   |                ^ help: replace it with: `p`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:43:16
-   |
-LL |     println!("{}", v = 1);
-   |                ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:44:16
-   |
-LL |     println!("{:0$}", v = 1);
-   |                ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:44:17
-   |
-LL |     println!("{:0$}", v = 1);
-   |                 ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:45:16
-   |
-LL |     println!("{0:0$}", v = 1);
-   |                ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:45:18
-   |
-LL |     println!("{0:0$}", v = 1);
-   |                  ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:46:16
-   |
-LL |     println!("{:0$.0$}", v = 1);
-   |                ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:46:20
-   |
-LL |     println!("{:0$.0$}", v = 1);
-   |                    ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:46:17
-   |
-LL |     println!("{:0$.0$}", v = 1);
-   |                 ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:47:16
-   |
-LL |     println!("{0:0$.0$}", v = 1);
-   |                ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:47:21
-   |
-LL |     println!("{0:0$.0$}", v = 1);
-   |                     ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:47:18
-   |
-LL |     println!("{0:0$.0$}", v = 1);
-   |                  ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:48:16
-   |
-LL |     println!("{0:0$.v$}", v = 1);
-   |                ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:48:18
-   |
-LL |     println!("{0:0$.v$}", v = 1);
-   |                  ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:49:16
-   |
-LL |     println!("{0:v$.0$}", v = 1);
-   |                ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:49:21
-   |
-LL |     println!("{0:v$.0$}", v = 1);
-   |                     ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:50:21
-   |
-LL |     println!("{v:0$.0$}", v = 1);
-   |                     ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:50:18
-   |
-LL |     println!("{v:0$.0$}", v = 1);
-   |                  ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:51:21
-   |
-LL |     println!("{v:v$.0$}", v = 1);
-   |                     ^ help: replace it with: `v`
-
-error: named parameter v is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:52:18
-   |
-LL |     println!("{v:0$.v$}", v = 1);
-   |                  ^ help: replace it with: `v`
-
-error: named parameter w is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:53:16
-   |
-LL |     println!("{:w$}", w = 1);
-   |                ^ help: replace it with: `w`
-
-error: named parameter p is used as a positional parameter
-  --> $DIR/positional_named_format_parameters.rs:54:16
-   |
-LL |     println!("{:.p$}", p = 1);
-   |                ^ help: replace it with: `p`
-
-error: aborting due to 69 previous errors
-
diff --git a/tests/ui/print_literal.rs b/tests/ui/print_literal.rs
index 8665a3bb28a..3f6639c1458 100644
--- a/tests/ui/print_literal.rs
+++ b/tests/ui/print_literal.rs
@@ -20,11 +20,13 @@ fn main() {
     println!("{} of {:b} people know binary, the other half doesn't", 1, 2);
     println!("10 / 4 is {}", 2.5);
     println!("2 + 1 = {}", 3);
+    println!("From expansion {}", stringify!(not a string literal));
 
     // these should throw warnings
     print!("Hello {}", "world");
     println!("Hello {} {}", world, "world");
     println!("Hello {}", "world");
+    println!("{} {:.4}", "a literal", 5);
 
     // positional args don't change the fact
     // that we're using a literal -- this should
diff --git a/tests/ui/print_literal.stderr b/tests/ui/print_literal.stderr
index 72aae075603..23e6dbc3e34 100644
--- a/tests/ui/print_literal.stderr
+++ b/tests/ui/print_literal.stderr
@@ -1,5 +1,5 @@
 error: literal with an empty format string
-  --> $DIR/print_literal.rs:25:24
+  --> $DIR/print_literal.rs:26:24
    |
 LL |     print!("Hello {}", "world");
    |                        ^^^^^^^
@@ -12,7 +12,7 @@ LL +     print!("Hello world");
    |
 
 error: literal with an empty format string
-  --> $DIR/print_literal.rs:26:36
+  --> $DIR/print_literal.rs:27:36
    |
 LL |     println!("Hello {} {}", world, "world");
    |                                    ^^^^^^^
@@ -24,7 +24,7 @@ LL +     println!("Hello {} world", world);
    |
 
 error: literal with an empty format string
-  --> $DIR/print_literal.rs:27:26
+  --> $DIR/print_literal.rs:28:26
    |
 LL |     println!("Hello {}", "world");
    |                          ^^^^^^^
@@ -36,7 +36,19 @@ LL +     println!("Hello world");
    |
 
 error: literal with an empty format string
-  --> $DIR/print_literal.rs:32:25
+  --> $DIR/print_literal.rs:29:26
+   |
+LL |     println!("{} {:.4}", "a literal", 5);
+   |                          ^^^^^^^^^^^
+   |
+help: try this
+   |
+LL -     println!("{} {:.4}", "a literal", 5);
+LL +     println!("a literal {:.4}", 5);
+   |
+
+error: literal with an empty format string
+  --> $DIR/print_literal.rs:34:25
    |
 LL |     println!("{0} {1}", "hello", "world");
    |                         ^^^^^^^
@@ -48,7 +60,7 @@ LL +     println!("hello {1}", "world");
    |
 
 error: literal with an empty format string
-  --> $DIR/print_literal.rs:32:34
+  --> $DIR/print_literal.rs:34:34
    |
 LL |     println!("{0} {1}", "hello", "world");
    |                                  ^^^^^^^
@@ -60,34 +72,34 @@ LL +     println!("{0} world", "hello");
    |
 
 error: literal with an empty format string
-  --> $DIR/print_literal.rs:33:25
+  --> $DIR/print_literal.rs:35:34
    |
 LL |     println!("{1} {0}", "hello", "world");
-   |                         ^^^^^^^
+   |                                  ^^^^^^^
    |
 help: try this
    |
 LL -     println!("{1} {0}", "hello", "world");
-LL +     println!("{1} hello", "world");
+LL +     println!("world {0}", "hello");
    |
 
 error: literal with an empty format string
-  --> $DIR/print_literal.rs:33:34
+  --> $DIR/print_literal.rs:35:25
    |
 LL |     println!("{1} {0}", "hello", "world");
-   |                                  ^^^^^^^
+   |                         ^^^^^^^
    |
 help: try this
    |
 LL -     println!("{1} {0}", "hello", "world");
-LL +     println!("world {0}", "hello");
+LL +     println!("{1} hello", "world");
    |
 
 error: literal with an empty format string
-  --> $DIR/print_literal.rs:36:29
+  --> $DIR/print_literal.rs:38:35
    |
 LL |     println!("{foo} {bar}", foo = "hello", bar = "world");
-   |                             ^^^^^^^^^^^^^
+   |                                   ^^^^^^^
    |
 help: try this
    |
@@ -96,10 +108,10 @@ LL +     println!("hello {bar}", bar = "world");
    |
 
 error: literal with an empty format string
-  --> $DIR/print_literal.rs:36:44
+  --> $DIR/print_literal.rs:38:50
    |
 LL |     println!("{foo} {bar}", foo = "hello", bar = "world");
-   |                                            ^^^^^^^^^^^^^
+   |                                                  ^^^^^^^
    |
 help: try this
    |
@@ -108,28 +120,28 @@ LL +     println!("{foo} world", foo = "hello");
    |
 
 error: literal with an empty format string
-  --> $DIR/print_literal.rs:37:29
+  --> $DIR/print_literal.rs:39:50
    |
 LL |     println!("{bar} {foo}", foo = "hello", bar = "world");
-   |                             ^^^^^^^^^^^^^
+   |                                                  ^^^^^^^
    |
 help: try this
    |
 LL -     println!("{bar} {foo}", foo = "hello", bar = "world");
-LL +     println!("{bar} hello", bar = "world");
+LL +     println!("world {foo}", foo = "hello");
    |
 
 error: literal with an empty format string
-  --> $DIR/print_literal.rs:37:44
+  --> $DIR/print_literal.rs:39:35
    |
 LL |     println!("{bar} {foo}", foo = "hello", bar = "world");
-   |                                            ^^^^^^^^^^^^^
+   |                                   ^^^^^^^
    |
 help: try this
    |
 LL -     println!("{bar} {foo}", foo = "hello", bar = "world");
-LL +     println!("world {foo}", foo = "hello");
+LL +     println!("{bar} hello", bar = "world");
    |
 
-error: aborting due to 11 previous errors
+error: aborting due to 12 previous errors
 
diff --git a/tests/ui/print_with_newline.rs b/tests/ui/print_with_newline.rs
index a43a1fc4f52..b8c29d207ad 100644
--- a/tests/ui/print_with_newline.rs
+++ b/tests/ui/print_with_newline.rs
@@ -48,5 +48,13 @@ fn main() {
     print!("\r\n");
     print!("foo\r\n");
     print!("\\r\n"); //~ ERROR
-    print!("foo\rbar\n") // ~ ERROR
+    print!("foo\rbar\n");
+
+    // Ignore expanded format strings
+    macro_rules! newline {
+        () => {
+            "\n"
+        };
+    }
+    print!(newline!());
 }
diff --git a/tests/ui/print_with_newline.stderr b/tests/ui/print_with_newline.stderr
index edbaa1cdf97..b9f5675faec 100644
--- a/tests/ui/print_with_newline.stderr
+++ b/tests/ui/print_with_newline.stderr
@@ -83,7 +83,7 @@ LL | |     );
 help: use `println!` instead
    |
 LL ~     println!(
-LL ~         ""
+LL ~         
    |
 
 error: using `print!()` with a format string that ends in a single newline
@@ -98,7 +98,7 @@ LL | |     );
 help: use `println!` instead
    |
 LL ~     println!(
-LL ~         r""
+LL ~         
    |
 
 error: using `print!()` with a format string that ends in a single newline
@@ -113,17 +113,5 @@ LL -     print!("/r/n"); //~ ERROR
 LL +     println!("/r"); //~ ERROR
    |
 
-error: using `print!()` with a format string that ends in a single newline
-  --> $DIR/print_with_newline.rs:51:5
-   |
-LL |     print!("foo/rbar/n") // ~ ERROR
-   |     ^^^^^^^^^^^^^^^^^^^^
-   |
-help: use `println!` instead
-   |
-LL -     print!("foo/rbar/n") // ~ ERROR
-LL +     println!("foo/rbar") // ~ ERROR
-   |
-
-error: aborting due to 10 previous errors
+error: aborting due to 9 previous errors
 
diff --git a/tests/ui/println_empty_string.stderr b/tests/ui/println_empty_string.stderr
index 17fe4ea7479..3cc8bb947bd 100644
--- a/tests/ui/println_empty_string.stderr
+++ b/tests/ui/println_empty_string.stderr
@@ -1,28 +1,36 @@
-error: using `println!("")`
+error: empty string literal in `println!`
   --> $DIR/println_empty_string.rs:6:5
    |
 LL |     println!("");
-   |     ^^^^^^^^^^^^ help: replace it with: `println!()`
+   |     ^^^^^^^^^--^
+   |              |
+   |              help: remove the empty string
    |
    = note: `-D clippy::println-empty-string` implied by `-D warnings`
 
-error: using `println!("")`
+error: empty string literal in `println!`
   --> $DIR/println_empty_string.rs:9:14
    |
 LL |         _ => println!(""),
-   |              ^^^^^^^^^^^^ help: replace it with: `println!()`
+   |              ^^^^^^^^^--^
+   |                       |
+   |                       help: remove the empty string
 
-error: using `eprintln!("")`
+error: empty string literal in `eprintln!`
   --> $DIR/println_empty_string.rs:13:5
    |
 LL |     eprintln!("");
-   |     ^^^^^^^^^^^^^ help: replace it with: `eprintln!()`
+   |     ^^^^^^^^^^--^
+   |               |
+   |               help: remove the empty string
 
-error: using `eprintln!("")`
+error: empty string literal in `eprintln!`
   --> $DIR/println_empty_string.rs:16:14
    |
 LL |         _ => eprintln!(""),
-   |              ^^^^^^^^^^^^^ help: replace it with: `eprintln!()`
+   |              ^^^^^^^^^^--^
+   |                        |
+   |                        help: remove the empty string
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/rename.fixed b/tests/ui/rename.fixed
index 9cbad2269a0..a6e7bdba77c 100644
--- a/tests/ui/rename.fixed
+++ b/tests/ui/rename.fixed
@@ -32,6 +32,7 @@
 #![allow(invalid_value)]
 #![allow(enum_intrinsics_non_enums)]
 #![allow(non_fmt_panics)]
+#![allow(named_arguments_used_positionally)]
 #![allow(temporary_cstring_as_ptr)]
 #![allow(unknown_lints)]
 #![allow(unused_labels)]
@@ -69,6 +70,7 @@
 #![warn(invalid_value)]
 #![warn(enum_intrinsics_non_enums)]
 #![warn(non_fmt_panics)]
+#![warn(named_arguments_used_positionally)]
 #![warn(temporary_cstring_as_ptr)]
 #![warn(unknown_lints)]
 #![warn(unused_labels)]
diff --git a/tests/ui/rename.rs b/tests/ui/rename.rs
index 9153c0dab02..e8f57597d02 100644
--- a/tests/ui/rename.rs
+++ b/tests/ui/rename.rs
@@ -32,6 +32,7 @@
 #![allow(invalid_value)]
 #![allow(enum_intrinsics_non_enums)]
 #![allow(non_fmt_panics)]
+#![allow(named_arguments_used_positionally)]
 #![allow(temporary_cstring_as_ptr)]
 #![allow(unknown_lints)]
 #![allow(unused_labels)]
@@ -69,6 +70,7 @@
 #![warn(clippy::invalid_ref)]
 #![warn(clippy::mem_discriminant_non_enum)]
 #![warn(clippy::panic_params)]
+#![warn(clippy::positional_named_format_parameters)]
 #![warn(clippy::temporary_cstring_as_ptr)]
 #![warn(clippy::unknown_clippy_lints)]
 #![warn(clippy::unused_label)]
diff --git a/tests/ui/rename.stderr b/tests/ui/rename.stderr
index 9c03ea914bb..31865a7f66d 100644
--- a/tests/ui/rename.stderr
+++ b/tests/ui/rename.stderr
@@ -1,5 +1,5 @@
 error: lint `clippy::blacklisted_name` has been renamed to `clippy::disallowed_names`
-  --> $DIR/rename.rs:38:9
+  --> $DIR/rename.rs:39:9
    |
 LL | #![warn(clippy::blacklisted_name)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::disallowed_names`
@@ -7,220 +7,226 @@ LL | #![warn(clippy::blacklisted_name)]
    = note: `-D renamed-and-removed-lints` implied by `-D warnings`
 
 error: lint `clippy::block_in_if_condition_expr` has been renamed to `clippy::blocks_in_if_conditions`
-  --> $DIR/rename.rs:39:9
+  --> $DIR/rename.rs:40:9
    |
 LL | #![warn(clippy::block_in_if_condition_expr)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::blocks_in_if_conditions`
 
 error: lint `clippy::block_in_if_condition_stmt` has been renamed to `clippy::blocks_in_if_conditions`
-  --> $DIR/rename.rs:40:9
+  --> $DIR/rename.rs:41:9
    |
 LL | #![warn(clippy::block_in_if_condition_stmt)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::blocks_in_if_conditions`
 
 error: lint `clippy::box_vec` has been renamed to `clippy::box_collection`
-  --> $DIR/rename.rs:41:9
+  --> $DIR/rename.rs:42:9
    |
 LL | #![warn(clippy::box_vec)]
    |         ^^^^^^^^^^^^^^^ help: use the new name: `clippy::box_collection`
 
 error: lint `clippy::const_static_lifetime` has been renamed to `clippy::redundant_static_lifetimes`
-  --> $DIR/rename.rs:42:9
+  --> $DIR/rename.rs:43:9
    |
 LL | #![warn(clippy::const_static_lifetime)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::redundant_static_lifetimes`
 
 error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cognitive_complexity`
-  --> $DIR/rename.rs:43:9
+  --> $DIR/rename.rs:44:9
    |
 LL | #![warn(clippy::cyclomatic_complexity)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
 
 error: lint `clippy::disallowed_method` has been renamed to `clippy::disallowed_methods`
-  --> $DIR/rename.rs:44:9
+  --> $DIR/rename.rs:45:9
    |
 LL | #![warn(clippy::disallowed_method)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::disallowed_methods`
 
 error: lint `clippy::disallowed_type` has been renamed to `clippy::disallowed_types`
-  --> $DIR/rename.rs:45:9
+  --> $DIR/rename.rs:46:9
    |
 LL | #![warn(clippy::disallowed_type)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::disallowed_types`
 
 error: lint `clippy::eval_order_dependence` has been renamed to `clippy::mixed_read_write_in_expression`
-  --> $DIR/rename.rs:46:9
+  --> $DIR/rename.rs:47:9
    |
 LL | #![warn(clippy::eval_order_dependence)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::mixed_read_write_in_expression`
 
 error: lint `clippy::for_loop_over_option` has been renamed to `clippy::for_loops_over_fallibles`
-  --> $DIR/rename.rs:47:9
+  --> $DIR/rename.rs:48:9
    |
 LL | #![warn(clippy::for_loop_over_option)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::for_loops_over_fallibles`
 
 error: lint `clippy::for_loop_over_result` has been renamed to `clippy::for_loops_over_fallibles`
-  --> $DIR/rename.rs:48:9
+  --> $DIR/rename.rs:49:9
    |
 LL | #![warn(clippy::for_loop_over_result)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::for_loops_over_fallibles`
 
 error: lint `clippy::identity_conversion` has been renamed to `clippy::useless_conversion`
-  --> $DIR/rename.rs:49:9
+  --> $DIR/rename.rs:50:9
    |
 LL | #![warn(clippy::identity_conversion)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::useless_conversion`
 
 error: lint `clippy::if_let_some_result` has been renamed to `clippy::match_result_ok`
-  --> $DIR/rename.rs:50:9
+  --> $DIR/rename.rs:51:9
    |
 LL | #![warn(clippy::if_let_some_result)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::match_result_ok`
 
 error: lint `clippy::logic_bug` has been renamed to `clippy::overly_complex_bool_expr`
-  --> $DIR/rename.rs:51:9
+  --> $DIR/rename.rs:52:9
    |
 LL | #![warn(clippy::logic_bug)]
    |         ^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::overly_complex_bool_expr`
 
 error: lint `clippy::new_without_default_derive` has been renamed to `clippy::new_without_default`
-  --> $DIR/rename.rs:52:9
+  --> $DIR/rename.rs:53:9
    |
 LL | #![warn(clippy::new_without_default_derive)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::new_without_default`
 
 error: lint `clippy::option_and_then_some` has been renamed to `clippy::bind_instead_of_map`
-  --> $DIR/rename.rs:53:9
+  --> $DIR/rename.rs:54:9
    |
 LL | #![warn(clippy::option_and_then_some)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::bind_instead_of_map`
 
 error: lint `clippy::option_expect_used` has been renamed to `clippy::expect_used`
-  --> $DIR/rename.rs:54:9
+  --> $DIR/rename.rs:55:9
    |
 LL | #![warn(clippy::option_expect_used)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::expect_used`
 
 error: lint `clippy::option_map_unwrap_or` has been renamed to `clippy::map_unwrap_or`
-  --> $DIR/rename.rs:55:9
+  --> $DIR/rename.rs:56:9
    |
 LL | #![warn(clippy::option_map_unwrap_or)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or`
 
 error: lint `clippy::option_map_unwrap_or_else` has been renamed to `clippy::map_unwrap_or`
-  --> $DIR/rename.rs:56:9
+  --> $DIR/rename.rs:57:9
    |
 LL | #![warn(clippy::option_map_unwrap_or_else)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or`
 
 error: lint `clippy::option_unwrap_used` has been renamed to `clippy::unwrap_used`
-  --> $DIR/rename.rs:57:9
+  --> $DIR/rename.rs:58:9
    |
 LL | #![warn(clippy::option_unwrap_used)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::unwrap_used`
 
 error: lint `clippy::ref_in_deref` has been renamed to `clippy::needless_borrow`
-  --> $DIR/rename.rs:58:9
+  --> $DIR/rename.rs:59:9
    |
 LL | #![warn(clippy::ref_in_deref)]
    |         ^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::needless_borrow`
 
 error: lint `clippy::result_expect_used` has been renamed to `clippy::expect_used`
-  --> $DIR/rename.rs:59:9
+  --> $DIR/rename.rs:60:9
    |
 LL | #![warn(clippy::result_expect_used)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::expect_used`
 
 error: lint `clippy::result_map_unwrap_or_else` has been renamed to `clippy::map_unwrap_or`
-  --> $DIR/rename.rs:60:9
+  --> $DIR/rename.rs:61:9
    |
 LL | #![warn(clippy::result_map_unwrap_or_else)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or`
 
 error: lint `clippy::result_unwrap_used` has been renamed to `clippy::unwrap_used`
-  --> $DIR/rename.rs:61:9
+  --> $DIR/rename.rs:62:9
    |
 LL | #![warn(clippy::result_unwrap_used)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::unwrap_used`
 
 error: lint `clippy::single_char_push_str` has been renamed to `clippy::single_char_add_str`
-  --> $DIR/rename.rs:62:9
+  --> $DIR/rename.rs:63:9
    |
 LL | #![warn(clippy::single_char_push_str)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::single_char_add_str`
 
 error: lint `clippy::stutter` has been renamed to `clippy::module_name_repetitions`
-  --> $DIR/rename.rs:63:9
+  --> $DIR/rename.rs:64:9
    |
 LL | #![warn(clippy::stutter)]
    |         ^^^^^^^^^^^^^^^ help: use the new name: `clippy::module_name_repetitions`
 
 error: lint `clippy::to_string_in_display` has been renamed to `clippy::recursive_format_impl`
-  --> $DIR/rename.rs:64:9
+  --> $DIR/rename.rs:65:9
    |
 LL | #![warn(clippy::to_string_in_display)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::recursive_format_impl`
 
 error: lint `clippy::zero_width_space` has been renamed to `clippy::invisible_characters`
-  --> $DIR/rename.rs:65:9
+  --> $DIR/rename.rs:66:9
    |
 LL | #![warn(clippy::zero_width_space)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::invisible_characters`
 
 error: lint `clippy::drop_bounds` has been renamed to `drop_bounds`
-  --> $DIR/rename.rs:66:9
+  --> $DIR/rename.rs:67:9
    |
 LL | #![warn(clippy::drop_bounds)]
    |         ^^^^^^^^^^^^^^^^^^^ help: use the new name: `drop_bounds`
 
 error: lint `clippy::into_iter_on_array` has been renamed to `array_into_iter`
-  --> $DIR/rename.rs:67:9
+  --> $DIR/rename.rs:68:9
    |
 LL | #![warn(clippy::into_iter_on_array)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `array_into_iter`
 
 error: lint `clippy::invalid_atomic_ordering` has been renamed to `invalid_atomic_ordering`
-  --> $DIR/rename.rs:68:9
+  --> $DIR/rename.rs:69:9
    |
 LL | #![warn(clippy::invalid_atomic_ordering)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `invalid_atomic_ordering`
 
 error: lint `clippy::invalid_ref` has been renamed to `invalid_value`
-  --> $DIR/rename.rs:69:9
+  --> $DIR/rename.rs:70:9
    |
 LL | #![warn(clippy::invalid_ref)]
    |         ^^^^^^^^^^^^^^^^^^^ help: use the new name: `invalid_value`
 
 error: lint `clippy::mem_discriminant_non_enum` has been renamed to `enum_intrinsics_non_enums`
-  --> $DIR/rename.rs:70:9
+  --> $DIR/rename.rs:71:9
    |
 LL | #![warn(clippy::mem_discriminant_non_enum)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `enum_intrinsics_non_enums`
 
 error: lint `clippy::panic_params` has been renamed to `non_fmt_panics`
-  --> $DIR/rename.rs:71:9
+  --> $DIR/rename.rs:72:9
    |
 LL | #![warn(clippy::panic_params)]
    |         ^^^^^^^^^^^^^^^^^^^^ help: use the new name: `non_fmt_panics`
 
+error: lint `clippy::positional_named_format_parameters` has been renamed to `named_arguments_used_positionally`
+  --> $DIR/rename.rs:73:9
+   |
+LL | #![warn(clippy::positional_named_format_parameters)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `named_arguments_used_positionally`
+
 error: lint `clippy::temporary_cstring_as_ptr` has been renamed to `temporary_cstring_as_ptr`
-  --> $DIR/rename.rs:72:9
+  --> $DIR/rename.rs:74:9
    |
 LL | #![warn(clippy::temporary_cstring_as_ptr)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `temporary_cstring_as_ptr`
 
 error: lint `clippy::unknown_clippy_lints` has been renamed to `unknown_lints`
-  --> $DIR/rename.rs:73:9
+  --> $DIR/rename.rs:75:9
    |
 LL | #![warn(clippy::unknown_clippy_lints)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `unknown_lints`
 
 error: lint `clippy::unused_label` has been renamed to `unused_labels`
-  --> $DIR/rename.rs:74:9
+  --> $DIR/rename.rs:76:9
    |
 LL | #![warn(clippy::unused_label)]
    |         ^^^^^^^^^^^^^^^^^^^^ help: use the new name: `unused_labels`
 
-error: aborting due to 37 previous errors
+error: aborting due to 38 previous errors
 
diff --git a/tests/ui/unnecessary_to_owned.fixed b/tests/ui/unnecessary_to_owned.fixed
index a920c63b199..f97583aa22f 100644
--- a/tests/ui/unnecessary_to_owned.fixed
+++ b/tests/ui/unnecessary_to_owned.fixed
@@ -417,3 +417,12 @@ mod issue_9351 {
         predicates_are_satisfied(id("abc".to_string()));
     }
 }
+
+mod issue_9504 {
+    #![allow(dead_code)]
+
+    async fn foo<S: AsRef<str>>(_: S) {}
+    async fn bar() {
+        foo(std::path::PathBuf::new().to_string_lossy().to_string()).await;
+    }
+}
diff --git a/tests/ui/unnecessary_to_owned.rs b/tests/ui/unnecessary_to_owned.rs
index 2128bdacdda..aa5394a5657 100644
--- a/tests/ui/unnecessary_to_owned.rs
+++ b/tests/ui/unnecessary_to_owned.rs
@@ -417,3 +417,12 @@ mod issue_9351 {
         predicates_are_satisfied(id("abc".to_string()));
     }
 }
+
+mod issue_9504 {
+    #![allow(dead_code)]
+
+    async fn foo<S: AsRef<str>>(_: S) {}
+    async fn bar() {
+        foo(std::path::PathBuf::new().to_string_lossy().to_string()).await;
+    }
+}
diff --git a/tests/ui/unused_peekable.rs b/tests/ui/unused_peekable.rs
index 153457e3671..7374dfdf92e 100644
--- a/tests/ui/unused_peekable.rs
+++ b/tests/ui/unused_peekable.rs
@@ -57,12 +57,22 @@ fn valid() {
     impl PeekableConsumer {
         fn consume(&self, _: Peekable<Empty<u32>>) {}
         fn consume_mut_ref(&self, _: &mut Peekable<Empty<u32>>) {}
+        fn consume_assoc(_: Peekable<Empty<u32>>) {}
+        fn consume_assoc_mut_ref(_: &mut Peekable<Empty<u32>>) {}
     }
-
     let peekable_consumer = PeekableConsumer;
-    let mut passed_along_to_method = std::iter::empty::<u32>().peekable();
-    peekable_consumer.consume_mut_ref(&mut passed_along_to_method);
-    peekable_consumer.consume(passed_along_to_method);
+
+    let peekable = std::iter::empty::<u32>().peekable();
+    peekable_consumer.consume(peekable);
+
+    let mut peekable = std::iter::empty::<u32>().peekable();
+    peekable_consumer.consume_mut_ref(&mut peekable);
+
+    let peekable = std::iter::empty::<u32>().peekable();
+    PeekableConsumer::consume_assoc(peekable);
+
+    let mut peekable = std::iter::empty::<u32>().peekable();
+    PeekableConsumer::consume_assoc_mut_ref(&mut peekable);
 
     // `peek` called in another block
     let mut peekable_in_block = std::iter::empty::<u32>().peekable();
@@ -141,4 +151,19 @@ fn valid() {
     {
         peekable_last_expr.peek();
     }
+
+    let mut peek_in_closure = std::iter::empty::<u32>().peekable();
+    let _ = || {
+        let _ = peek_in_closure.peek();
+    };
+
+    trait PeekTrait {}
+    impl<I> PeekTrait for Peekable<I> where I: Iterator {}
+
+    let mut peekable = std::iter::empty::<u32>().peekable();
+    let _dyn = &mut peekable as &mut dyn PeekTrait;
+
+    fn takes_dyn(_: &mut dyn PeekTrait) {}
+    let mut peekable = std::iter::empty::<u32>().peekable();
+    takes_dyn(&mut peekable);
 }
diff --git a/tests/ui/use_self.fixed b/tests/ui/use_self.fixed
index 4f80aaecc90..37986187da1 100644
--- a/tests/ui/use_self.fixed
+++ b/tests/ui/use_self.fixed
@@ -608,3 +608,12 @@ mod issue8845 {
         }
     }
 }
+
+mod issue6902 {
+    use serde::Serialize;
+
+    #[derive(Serialize)]
+    pub enum Foo {
+        Bar = 1,
+    }
+}
diff --git a/tests/ui/use_self.rs b/tests/ui/use_self.rs
index 52da72db53c..1b2b3337c92 100644
--- a/tests/ui/use_self.rs
+++ b/tests/ui/use_self.rs
@@ -608,3 +608,12 @@ mod issue8845 {
         }
     }
 }
+
+mod issue6902 {
+    use serde::Serialize;
+
+    #[derive(Serialize)]
+    pub enum Foo {
+        Bar = 1,
+    }
+}
diff --git a/tests/ui/write_literal.rs b/tests/ui/write_literal.rs
index 44669174411..5892818aa9a 100644
--- a/tests/ui/write_literal.rs
+++ b/tests/ui/write_literal.rs
@@ -25,11 +25,13 @@ fn main() {
     writeln!(v, "{} of {:b} people know binary, the other half doesn't", 1, 2);
     writeln!(v, "10 / 4 is {}", 2.5);
     writeln!(v, "2 + 1 = {}", 3);
+    writeln!(v, "From expansion {}", stringify!(not a string literal));
 
     // these should throw warnings
     write!(v, "Hello {}", "world");
     writeln!(v, "Hello {} {}", world, "world");
     writeln!(v, "Hello {}", "world");
+    writeln!(v, "{} {:.4}", "a literal", 5);
 
     // positional args don't change the fact
     // that we're using a literal -- this should
diff --git a/tests/ui/write_literal.stderr b/tests/ui/write_literal.stderr
index 3c5ec91d3e0..1e306ae28a2 100644
--- a/tests/ui/write_literal.stderr
+++ b/tests/ui/write_literal.stderr
@@ -1,5 +1,5 @@
 error: literal with an empty format string
-  --> $DIR/write_literal.rs:30:27
+  --> $DIR/write_literal.rs:31:27
    |
 LL |     write!(v, "Hello {}", "world");
    |                           ^^^^^^^
@@ -12,7 +12,7 @@ LL +     write!(v, "Hello world");
    |
 
 error: literal with an empty format string
-  --> $DIR/write_literal.rs:31:39
+  --> $DIR/write_literal.rs:32:39
    |
 LL |     writeln!(v, "Hello {} {}", world, "world");
    |                                       ^^^^^^^
@@ -24,7 +24,7 @@ LL +     writeln!(v, "Hello {} world", world);
    |
 
 error: literal with an empty format string
-  --> $DIR/write_literal.rs:32:29
+  --> $DIR/write_literal.rs:33:29
    |
 LL |     writeln!(v, "Hello {}", "world");
    |                             ^^^^^^^
@@ -36,7 +36,19 @@ LL +     writeln!(v, "Hello world");
    |
 
 error: literal with an empty format string
-  --> $DIR/write_literal.rs:37:28
+  --> $DIR/write_literal.rs:34:29
+   |
+LL |     writeln!(v, "{} {:.4}", "a literal", 5);
+   |                             ^^^^^^^^^^^
+   |
+help: try this
+   |
+LL -     writeln!(v, "{} {:.4}", "a literal", 5);
+LL +     writeln!(v, "a literal {:.4}", 5);
+   |
+
+error: literal with an empty format string
+  --> $DIR/write_literal.rs:39:28
    |
 LL |     writeln!(v, "{0} {1}", "hello", "world");
    |                            ^^^^^^^
@@ -48,7 +60,7 @@ LL +     writeln!(v, "hello {1}", "world");
    |
 
 error: literal with an empty format string
-  --> $DIR/write_literal.rs:37:37
+  --> $DIR/write_literal.rs:39:37
    |
 LL |     writeln!(v, "{0} {1}", "hello", "world");
    |                                     ^^^^^^^
@@ -60,34 +72,34 @@ LL +     writeln!(v, "{0} world", "hello");
    |
 
 error: literal with an empty format string
-  --> $DIR/write_literal.rs:38:28
+  --> $DIR/write_literal.rs:40:37
    |
 LL |     writeln!(v, "{1} {0}", "hello", "world");
-   |                            ^^^^^^^
+   |                                     ^^^^^^^
    |
 help: try this
    |
 LL -     writeln!(v, "{1} {0}", "hello", "world");
-LL +     writeln!(v, "{1} hello", "world");
+LL +     writeln!(v, "world {0}", "hello");
    |
 
 error: literal with an empty format string
-  --> $DIR/write_literal.rs:38:37
+  --> $DIR/write_literal.rs:40:28
    |
 LL |     writeln!(v, "{1} {0}", "hello", "world");
-   |                                     ^^^^^^^
+   |                            ^^^^^^^
    |
 help: try this
    |
 LL -     writeln!(v, "{1} {0}", "hello", "world");
-LL +     writeln!(v, "world {0}", "hello");
+LL +     writeln!(v, "{1} hello", "world");
    |
 
 error: literal with an empty format string
-  --> $DIR/write_literal.rs:41:32
+  --> $DIR/write_literal.rs:43:38
    |
 LL |     writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
-   |                                ^^^^^^^^^^^^^
+   |                                      ^^^^^^^
    |
 help: try this
    |
@@ -96,10 +108,10 @@ LL +     writeln!(v, "hello {bar}", bar = "world");
    |
 
 error: literal with an empty format string
-  --> $DIR/write_literal.rs:41:47
+  --> $DIR/write_literal.rs:43:53
    |
 LL |     writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
-   |                                               ^^^^^^^^^^^^^
+   |                                                     ^^^^^^^
    |
 help: try this
    |
@@ -108,28 +120,28 @@ LL +     writeln!(v, "{foo} world", foo = "hello");
    |
 
 error: literal with an empty format string
-  --> $DIR/write_literal.rs:42:32
+  --> $DIR/write_literal.rs:44:53
    |
 LL |     writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
-   |                                ^^^^^^^^^^^^^
+   |                                                     ^^^^^^^
    |
 help: try this
    |
 LL -     writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
-LL +     writeln!(v, "{bar} hello", bar = "world");
+LL +     writeln!(v, "world {foo}", foo = "hello");
    |
 
 error: literal with an empty format string
-  --> $DIR/write_literal.rs:42:47
+  --> $DIR/write_literal.rs:44:38
    |
 LL |     writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
-   |                                               ^^^^^^^^^^^^^
+   |                                      ^^^^^^^
    |
 help: try this
    |
 LL -     writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
-LL +     writeln!(v, "world {foo}", foo = "hello");
+LL +     writeln!(v, "{bar} hello", bar = "world");
    |
 
-error: aborting due to 11 previous errors
+error: aborting due to 12 previous errors
 
diff --git a/tests/ui/write_literal_2.rs b/tests/ui/write_literal_2.rs
index ba0d7be5eaa..55a11daa1d3 100644
--- a/tests/ui/write_literal_2.rs
+++ b/tests/ui/write_literal_2.rs
@@ -10,7 +10,7 @@ fn main() {
     writeln!(v, r"{}", r"{hello}");
     writeln!(v, "{}", '\'');
     writeln!(v, "{}", '"');
-    writeln!(v, r"{}", '"'); // don't lint
+    writeln!(v, r"{}", '"');
     writeln!(v, r"{}", '\'');
     writeln!(
         v,
@@ -24,4 +24,11 @@ fn main() {
         {} \\ {}",
         "1", "2", "3",
     );
+    writeln!(v, "{}", "\\");
+    writeln!(v, r"{}", "\\");
+    writeln!(v, r#"{}"#, "\\");
+    writeln!(v, "{}", r"\");
+    writeln!(v, "{}", "\r");
+    writeln!(v, r#"{}{}"#, '#', '"'); // hard mode
+    writeln!(v, r"{}", "\r"); // should not lint
 }
diff --git a/tests/ui/write_literal_2.stderr b/tests/ui/write_literal_2.stderr
index 9ff297069c4..d5956db9ff0 100644
--- a/tests/ui/write_literal_2.stderr
+++ b/tests/ui/write_literal_2.stderr
@@ -48,6 +48,12 @@ LL +     writeln!(v, "/"");
    |
 
 error: literal with an empty format string
+  --> $DIR/write_literal_2.rs:13:24
+   |
+LL |     writeln!(v, r"{}", '"');
+   |                        ^^^
+
+error: literal with an empty format string
   --> $DIR/write_literal_2.rs:14:24
    |
 LL |     writeln!(v, r"{}", '/'');
@@ -108,5 +114,77 @@ LL ~         {} / 3",
 LL ~         "1", "2",
    |
 
-error: aborting due to 9 previous errors
+error: literal with an empty format string
+  --> $DIR/write_literal_2.rs:27:23
+   |
+LL |     writeln!(v, "{}", "/");
+   |                       ^^^^
+   |
+help: try this
+   |
+LL -     writeln!(v, "{}", "/");
+LL +     writeln!(v, "/");
+   |
+
+error: literal with an empty format string
+  --> $DIR/write_literal_2.rs:28:24
+   |
+LL |     writeln!(v, r"{}", "/");
+   |                        ^^^^
+   |
+help: try this
+   |
+LL -     writeln!(v, r"{}", "/");
+LL +     writeln!(v, r"/");
+   |
+
+error: literal with an empty format string
+  --> $DIR/write_literal_2.rs:29:26
+   |
+LL |     writeln!(v, r#"{}"#, "/");
+   |                          ^^^^
+   |
+help: try this
+   |
+LL -     writeln!(v, r#"{}"#, "/");
+LL +     writeln!(v, r#"/"#);
+   |
+
+error: literal with an empty format string
+  --> $DIR/write_literal_2.rs:30:23
+   |
+LL |     writeln!(v, "{}", r"/");
+   |                       ^^^^
+   |
+help: try this
+   |
+LL -     writeln!(v, "{}", r"/");
+LL +     writeln!(v, "/");
+   |
+
+error: literal with an empty format string
+  --> $DIR/write_literal_2.rs:31:23
+   |
+LL |     writeln!(v, "{}", "/r");
+   |                       ^^^^
+   |
+help: try this
+   |
+LL -     writeln!(v, "{}", "/r");
+LL +     writeln!(v, "/r");
+   |
+
+error: literal with an empty format string
+  --> $DIR/write_literal_2.rs:32:28
+   |
+LL |     writeln!(v, r#"{}{}"#, '#', '"'); // hard mode
+   |                            ^^^
+
+error: literal with an empty format string
+  --> $DIR/write_literal_2.rs:32:33
+   |
+LL |     writeln!(v, r#"{}{}"#, '#', '"'); // hard mode
+   |                                 ^^^
+
+error: aborting due to 17 previous errors
 
diff --git a/tests/ui/write_with_newline.rs b/tests/ui/write_with_newline.rs
index 446d6914d34..b79364c8758 100644
--- a/tests/ui/write_with_newline.rs
+++ b/tests/ui/write_with_newline.rs
@@ -56,4 +56,12 @@ fn main() {
     write!(v, "foo\r\n");
     write!(v, "\\r\n"); //~ ERROR
     write!(v, "foo\rbar\n");
+
+    // Ignore expanded format strings
+    macro_rules! newline {
+        () => {
+            "\n"
+        };
+    }
+    write!(v, newline!());
 }
diff --git a/tests/ui/write_with_newline.stderr b/tests/ui/write_with_newline.stderr
index 5f55431be0b..2baaea166d8 100644
--- a/tests/ui/write_with_newline.stderr
+++ b/tests/ui/write_with_newline.stderr
@@ -5,7 +5,7 @@ LL |     write!(v, "Hello/n");
    |     ^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D clippy::write-with-newline` implied by `-D warnings`
-help: use `writeln!()` instead
+help: use `writeln!` instead
    |
 LL -     write!(v, "Hello/n");
 LL +     writeln!(v, "Hello");
@@ -17,7 +17,7 @@ error: using `write!()` with a format string that ends in a single newline
 LL |     write!(v, "Hello {}/n", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: use `writeln!()` instead
+help: use `writeln!` instead
    |
 LL -     write!(v, "Hello {}/n", "world");
 LL +     writeln!(v, "Hello {}", "world");
@@ -29,7 +29,7 @@ error: using `write!()` with a format string that ends in a single newline
 LL |     write!(v, "Hello {} {}/n", "world", "#2");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: use `writeln!()` instead
+help: use `writeln!` instead
    |
 LL -     write!(v, "Hello {} {}/n", "world", "#2");
 LL +     writeln!(v, "Hello {} {}", "world", "#2");
@@ -41,7 +41,7 @@ error: using `write!()` with a format string that ends in a single newline
 LL |     write!(v, "{}/n", 1265);
    |     ^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: use `writeln!()` instead
+help: use `writeln!` instead
    |
 LL -     write!(v, "{}/n", 1265);
 LL +     writeln!(v, "{}", 1265);
@@ -53,7 +53,7 @@ error: using `write!()` with a format string that ends in a single newline
 LL |     write!(v, "/n");
    |     ^^^^^^^^^^^^^^^
    |
-help: use `writeln!()` instead
+help: use `writeln!` instead
    |
 LL -     write!(v, "/n");
 LL +     writeln!(v);
@@ -65,7 +65,7 @@ error: using `write!()` with a format string that ends in a single newline
 LL |     write!(v, "//n"); // should fail
    |     ^^^^^^^^^^^^^^^^^
    |
-help: use `writeln!()` instead
+help: use `writeln!` instead
    |
 LL -     write!(v, "//n"); // should fail
 LL +     writeln!(v, "/"); // should fail
@@ -81,11 +81,10 @@ LL | | "
 LL | |     );
    | |_____^
    |
-help: use `writeln!()` instead
+help: use `writeln!` instead
    |
 LL ~     writeln!(
-LL |         v,
-LL ~         ""
+LL ~         v
    |
 
 error: using `write!()` with a format string that ends in a single newline
@@ -98,11 +97,10 @@ LL | | "
 LL | |     );
    | |_____^
    |
-help: use `writeln!()` instead
+help: use `writeln!` instead
    |
 LL ~     writeln!(
-LL |         v,
-LL ~         r""
+LL ~         v
    |
 
 error: using `write!()` with a format string that ends in a single newline
@@ -111,23 +109,11 @@ error: using `write!()` with a format string that ends in a single newline
 LL |     write!(v, "/r/n"); //~ ERROR
    |     ^^^^^^^^^^^^^^^^^^
    |
-help: use `writeln!()` instead
+help: use `writeln!` instead
    |
 LL -     write!(v, "/r/n"); //~ ERROR
 LL +     writeln!(v, "/r"); //~ ERROR
    |
 
-error: using `write!()` with a format string that ends in a single newline
-  --> $DIR/write_with_newline.rs:58:5
-   |
-LL |     write!(v, "foo/rbar/n");
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: use `writeln!()` instead
-   |
-LL -     write!(v, "foo/rbar/n");
-LL +     writeln!(v, "foo/rbar");
-   |
-
-error: aborting due to 10 previous errors
+error: aborting due to 9 previous errors
 
diff --git a/tests/ui/writeln_empty_string.stderr b/tests/ui/writeln_empty_string.stderr
index ac65aadfc0e..25e69ec48e7 100644
--- a/tests/ui/writeln_empty_string.stderr
+++ b/tests/ui/writeln_empty_string.stderr
@@ -1,16 +1,20 @@
-error: using `writeln!(v, "")`
+error: empty string literal in `writeln!`
   --> $DIR/writeln_empty_string.rs:11:5
    |
 LL |     writeln!(v, "");
-   |     ^^^^^^^^^^^^^^^ help: replace it with: `writeln!(v)`
+   |     ^^^^^^^^^^----^
+   |               |
+   |               help: remove the empty string
    |
    = note: `-D clippy::writeln-empty-string` implied by `-D warnings`
 
-error: using `writeln!(suggestion, "")`
+error: empty string literal in `writeln!`
   --> $DIR/writeln_empty_string.rs:14:5
    |
 LL |     writeln!(suggestion, "");
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `writeln!(suggestion)`
+   |     ^^^^^^^^^^^^^^^^^^^----^
+   |                        |
+   |                        help: remove the empty string
 
 error: aborting due to 2 previous errors