Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not visit whole crate to compute lints_that_dont_need_to_run. #133781

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Dec 3, 2024

r? @ghost

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 3, 2024
@cjgillot
Copy link
Contributor Author

cjgillot commented Dec 3, 2024

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 3, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 3, 2024
Do not visit whole crate to compute `lints_that_dont_need_to_run`.

r? `@ghost`
@bors
Copy link
Contributor

bors commented Dec 3, 2024

⌛ Trying commit be33355 with merge 70d22e5...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/assertions_on_constants.stderr` to the actual output
--- tests/ui/assertions_on_constants.stderr
+++ <stderr output>
-error: `assert!(true)` will be optimized out by the compiler
-   |
-LL |     assert!(true);
-   |     ^^^^^^^^^^^^^
-   |
-   |
-   = help: remove it
-   = note: `-D clippy::assertions-on-constants` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::assertions_on_constants)]`
-
-error: `assert!(false)` should probably be replaced
-   |
-LL |     assert!(false);
-   |     ^^^^^^^^^^^^^^
-   |
-   |
-   = help: use `panic!()` or `unreachable!()`
-
-error: `assert!(true)` will be optimized out by the compiler
-   |
-   |
-LL |     assert!(true, "true message");
-   |
-   = help: remove it
-
-
-error: `assert!(false, ..)` should probably be replaced
-   |
-   |
-LL |     assert!(false, "false message");
-   |
-   |
-   = help: use `panic!(..)` or `unreachable!(..)`
-
-error: `assert!(false, ..)` should probably be replaced
-   |
-   |
-LL |     assert!(false, "{}", msg.to_uppercase());
-   |
-   |
-   = help: use `panic!(..)` or `unreachable!(..)`
-
-error: `assert!(true)` will be optimized out by the compiler
-   |
-LL |     assert!(B);
-   |     ^^^^^^^^^^
-   |
-   |
-   = help: remove it
-
-error: `assert!(false)` should probably be replaced
-   |
-LL |     assert!(C);
-   |     ^^^^^^^^^^
-   |
-   |
-   = help: use `panic!()` or `unreachable!()`
-
-error: `assert!(false, ..)` should probably be replaced
-   |
-   |
-LL |     assert!(C, "C message");
-   |
-   |
-   = help: use `panic!(..)` or `unreachable!(..)`
-
-error: `debug_assert!(true)` will be optimized out by the compiler
-   |
-LL |     debug_assert!(true);
-   |     ^^^^^^^^^^^^^^^^^^^
-   |
-   |
-   = help: remove it
-
-error: `assert!(true)` will be optimized out by the compiler
-   |
-   |
-LL |     const _: () = assert!(true);
-   |
-   = help: remove it
-
-
-error: `assert!(true)` will be optimized out by the compiler
-   |
-   |
-LL |     assert!(8 == (7 + 1));
-   |
-   = help: remove it
-
-
-error: `assert!(true)` will be optimized out by the compiler
-   |
-LL |     assert!(true);
-   |     ^^^^^^^^^^^^^
-   |
-   |
-   = help: remove it
-
-error: aborting due to 12 previous errors
-


error: ``assert!(true)` will be optimized out by the compiler` not found in diagnostics on line 10
   |
   |
11 |     //~^ ERROR: `assert!(true)` will be optimized out by the compiler
   |


error: ``assert!(false)` should probably be replaced` not found in diagnostics on line 12
   |
   |
13 |     //~^ ERROR: `assert!(false)` should probably be replaced
   |


error: ``assert!(true)` will be optimized out by the compiler` not found in diagnostics on line 14
   |
   |
15 |     //~^ ERROR: `assert!(true)` will be optimized out by the compiler
   |


error: ``assert!(false, ..)` should probably be replaced` not found in diagnostics on line 16
   |
   |
17 |     //~^ ERROR: `assert!(false, ..)` should probably be replaced
   |


error: ``assert!(false, ..)` should probably be replaced` not found in diagnostics on line 20
   |
   |
21 |     //~^ ERROR: `assert!(false, ..)` should probably be replaced
   |


error: ``assert!(true)` will be optimized out by the compiler` not found in diagnostics on line 24
   |
   |
25 |     //~^ ERROR: `assert!(true)` will be optimized out by the compiler
   |


error: ``assert!(false)` should probably be replaced` not found in diagnostics on line 28
   |
   |
29 |     //~^ ERROR: `assert!(false)` should probably be replaced
   |


error: ``assert!(false, ..)` should probably be replaced` not found in diagnostics on line 30
   |
   |
31 |     //~^ ERROR: `assert!(false, ..)` should probably be replaced
   |


error: ``debug_assert!(true)` will be optimized out by the compiler` not found in diagnostics on line 33
   |
   |
34 |     //~^ ERROR: `debug_assert!(true)` will be optimized out by the compiler
   |


error: ``assert!(true)` will be optimized out by the compiler` not found in diagnostics on line 49
   |
   |
50 |     //~^ ERROR: `assert!(true)` will be optimized out by the compiler
   |


error: ``assert!(true)` will be optimized out by the compiler` not found in diagnostics on line 52
   |
   |
53 |     //~^ ERROR: `assert!(true)` will be optimized out by the compiler
   |


error: ``assert!(true)` will be optimized out by the compiler` not found in diagnostics on line 61
   |
   |
62 |     //~^ ERROR: `assert!(true)` will be optimized out by the compiler
   |


FAILED TEST: tests/ui/absurd-extreme-comparisons.rs
---
   --> tests/ui/absurd-extreme-comparisons.rs:14:5
... 134 lines skipped ...
    = help: because `false` is the minimum value for this type, this comparison is always false
 
-error: <-comparison of unit values detected. This will always be false
 
-error: aborting due to 18 previous errors
-



error: `<-comparison of unit values detected. This will always be false` not found in diagnostics on line 52
   |
   |
53 |     //~^ ERROR: <-comparison of unit values detected. This will always be false
   |


error: ``#[deny(clippy::unit_cmp)]` on by default` not found in diagnostics on line 52
   |
   |
54 |     //~| NOTE: `#[deny(clippy::unit_cmp)]` on by default
   |


FAILED TEST: tests/ui/borrow_deref_ref_unfixable.rs
---
-LL |         let x: &str = s;
-   |                       ~
-help: if you would like to deref, try using `&**`
-   |
-LL |         let x: &str = &**s;
-
-error: aborting due to 1 previous error
-

---
10 |         //~^ ERROR: deref on an immutable reference
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |

error: ``-D clippy::borrow-deref-ref` implied by `-D warnings`` not found in diagnostics on line 9
   |
   |
11 |         //~| NOTE: `-D clippy::borrow-deref-ref` implied by `-D warnings`
   |


FAILED TEST: tests/ui/byte_char_slices.rs
---
+++ <stderr output>
 error: can be more succinctly written as a byte str
   --> tests/ui/byte_char_slices.rs:5:15
... 23 lines skipped ...
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `b"\x42Esc"`
-error: useless use of `vec!`
+error: aborting due to 4 previous errors
 
-error: aborting due to 5 previous errors
---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/cast.stderr` to the actual output
--- tests/ui/cast.stderr
+++ <stderr output>
 error: casting `i32` to `f32` causes a loss of precision (`i32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide)
... 550 lines skipped ...
    |     ^^^^^^^^^^^^^^^^^^^^^^^
 
-error: equal expressions as operands to `/`
-error: equal expressions as operands to `/`
-  --> tests/ui/cast.rs:433:6
-   |
-LL |     (y / y * y * -2) as u16;
-   |
-   |
-   = note: `#[deny(clippy::eq_op)]` on by default
 error: casting `i16` to `u16` may lose the sign of the value
   --> tests/ui/cast.rs:436:5
... 167 lines skipped ...
    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---

FAILED TEST: tests/ui/cast_slice_different_sizes.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/cast_slice_different_sizes.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/cast_slice_different_sizes.stderr` to the actual output
--- tests/ui/cast_slice_different_sizes.stderr
+++ <stderr output>
-error: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |     let b = a as *const [u8];
-   |             ^^^^^^^^^^^^^^^^ help: replace with `ptr::slice_from_raw_parts`: `core::ptr::slice_from_raw_parts(a as *const u8, ..)`
-   = note: `#[deny(clippy::cast_slice_different_sizes)]` on by default
-
-
-error: casting between raw pointers to `[u8]` (element size 1) and `[u32]` (element size 4) does not adjust the count
-   |
-LL |     let c = b as *const [u32];
-LL |     let c = b as *const [u32];
-   |             ^^^^^^^^^^^^^^^^^ help: replace with `ptr::slice_from_raw_parts`: `core::ptr::slice_from_raw_parts(b as *const u32, ..)`
-
-error: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |     let loss = r_x as *const [i32] as *const [u8];
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with `ptr::slice_from_raw_parts`: `core::ptr::slice_from_raw_parts(r_x as *const [i32] as *const u8, ..)`
-
-error: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |     let loss_block_1 = { r_x as *const [i32] } as *const [u8];
-   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with `ptr::slice_from_raw_parts`: `core::ptr::slice_from_raw_parts({ r_x as *const [i32] } as *const u8, ..)`
-
-error: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |       let loss_block_2 = {
-LL | |
-LL | |         let _ = ();
-LL | |         let _ = ();
-LL | |         r_x as *const [i32]
-LL | |     } as *const [u8];
-   |
-help: replace with `ptr::slice_from_raw_parts`
-   |
-   |
-LL ~     let loss_block_2 = core::ptr::slice_from_raw_parts({
-LL +
-LL +         let _ = ();
-LL +         r_x as *const [i32]
-LL ~     } as *const u8, ..);
-
-
-error: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |     let long_chain_loss = r_x as *const [i32] as *const [u32] as *const [u16] as *const [i8] as *const [u8];
-   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with `ptr::slice_from_raw_parts`: `core::ptr::slice_from_raw_parts(r_x as *const [i32] as *const u8, ..)`
-
-error: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |   fn bar(x: *mut [u16]) -> *mut [u8] {
-LL | |
-LL | |     x as *mut [u8]
-LL | | }
-LL | | }
-   | |_^ help: replace with `ptr::slice_from_raw_parts_mut`: `core::ptr::slice_from_raw_parts_mut(x as *mut u8, ..)`
-
-error: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |   fn uwu(x: *mut [u16]) -> *mut [u8] {
-LL | |
-LL | |     x as *mut _
-LL | | }
-LL | | }
-   | |_^ help: replace with `ptr::slice_from_raw_parts_mut`: `core::ptr::slice_from_raw_parts_mut(x as *mut u8, ..)`
-
-error: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |   fn bar2(x: *mut [u16]) -> *mut [u8] {
-LL | |
-LL | |     x as _
-LL | | }
-LL | | }
-   | |_^ help: replace with `ptr::slice_from_raw_parts_mut`: `core::ptr::slice_from_raw_parts_mut(x as *mut u8, ..)`
-
-error: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |   fn bar3(x: *mut [u16]) -> *const [u8] {
-LL | |
-LL | |     x as _
-LL | | }
-LL | | }
-   | |_^ help: replace with `ptr::slice_from_raw_parts`: `core::ptr::slice_from_raw_parts(x as *const u8, ..)`
-
-error: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |   fn bar4(x: *const [u16]) -> *mut [u8] {
-LL | |
-LL | |     x as _
-LL | | }
-LL | | }
-   | |_^ help: replace with `ptr::slice_from_raw_parts_mut`: `core::ptr::slice_from_raw_parts_mut(x as *mut u8, ..)`
-
-error: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |   fn blocks(x: *mut [u16]) -> *mut [u8] {
-LL | |
-LL | |
-LL | |     ({ x }) as _
-LL | | }
-   | |_^ help: replace with `ptr::slice_from_raw_parts_mut`: `core::ptr::slice_from_raw_parts_mut(({ x }) as *mut u8, ..)`
-
-error: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |   fn more_blocks(x: *mut [u16]) -> *mut [u8] {
-LL | |
-LL | |
-LL | |     { ({ x }) as _ }
-LL | | }
-LL | | }
-   | |_^ help: replace with `ptr::slice_from_raw_parts_mut`: `core::ptr::slice_from_raw_parts_mut(({ x }) as *mut u8, ..)`
-
-error: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element size 1) does not adjust the count
-   |
-   |
-LL |     { ({ x }) as _ }
-   |     ^^^^^^^^^^^^^^^^ help: replace with `ptr::slice_from_raw_parts_mut`: `core::ptr::slice_from_raw_parts_mut(({ x }) as *mut u8, ..)`
-error: aborting due to 14 previous errors
-



error: `casting between raw pointers to `[i32]` (element size 4) and `[u8]` (eleme` not found in diagnostics on line 10
   |
   |
11 |     //~^ ERROR: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (eleme
   |


error: ``#[deny(clippy::cast_slice_different_sizes)]` on by default` not found in diagnostics on line 10
   |
   |
12 |     //~| NOTE: `#[deny(clippy::cast_slice_different_sizes)]` on by default
   |


error: `casting between raw pointers to `[u8]` (element size 1) and `[u32]` (eleme` not found in diagnostics on line 13
   |
   |
14 |     //~^ ERROR: casting between raw pointers to `[u8]` (element size 1) and `[u32]` (eleme
   |


error: `casting between raw pointers to `[i32]` (element size 4) and `[u8]` (eleme` not found in diagnostics on line 17
   |
   |
18 |     //~^ ERROR: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (eleme
   |


error: `casting between raw pointers to `[i32]` (element size 4) and `[u8]` (eleme` not found in diagnostics on line 25
   |
   |
26 |     //~^ ERROR: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (eleme
   |


error: `casting between raw pointers to `[i32]` (element size 4) and `[u8]` (eleme` not found in diagnostics on line 27
   |
   |
28 |         //~^ ERROR: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (eleme
   |


error: `casting between raw pointers to `[i32]` (element size 4) and `[u8]` (eleme` not found in diagnostics on line 45
   |
   |
46 |     //~^ ERROR: casting between raw pointers to `[i32]` (element size 4) and `[u8]` (eleme
   |


error: `casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s` not found in diagnostics on line 61
   |
   |
62 |     //~^ ERROR: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s
   |


error: `casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s` not found in diagnostics on line 66
   |
   |
67 |     //~^ ERROR: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s
   |


error: `casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s` not found in diagnostics on line 71
   |
   |
72 |     //~^ ERROR: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s
   |


error: `casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s` not found in diagnostics on line 77
   |
   |
78 |     //~^ ERROR: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s
   |


error: `casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s` not found in diagnostics on line 83
   |
   |
84 |     //~^ ERROR: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s
   |


error: `casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s` not found in diagnostics on line 89
   |
   |
90 |     //~^ ERROR: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s
   |


error: `casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s` not found in diagnostics on line 94
   |
   |
95 |     //~^ ERROR: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (element s
   |


error: `casting between raw pointers to `[u16]` (element size 2) and `[u8]` (eleme` not found in diagnostics on line 96
   |
   |
97 |     //~^ ERROR: casting between raw pointers to `[u16]` (element size 2) and `[u8]` (eleme
   |


FAILED TEST: tests/ui/clone_on_copy.rs
---
-
-error: using `clone` on type `i32` which implements the `Copy` trait
-  --> tests/ui/clone_on_copy.rs:27:5
-   |
-LL |     (&42).clone();
-   |     ^^^^^^^^^^^^^ help: try dereferencing it: `*(&42)`
-error: using `clone` on type `i32` which implements the `Copy` trait
-  --> tests/ui/clone_on_copy.rs:30:5
-   |
-   |
-LL |     rc.borrow().clone();
-   |     ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rc.borrow()`
-error: using `clone` on type `u32` which implements the `Copy` trait
-  --> tests/ui/clone_on_copy.rs:33:5
-   |
-   |
-LL |     x.clone().rotate_left(1);
-   |     ^^^^^^^^^ help: try removing the `clone` call: `x`
-error: using `clone` on type `i32` which implements the `Copy` trait
-  --> tests/ui/clone_on_copy.rs:47:5
-   |
-   |
-LL |     m!(42).clone();
-   |     ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m!(42)`
-
-error: using `clone` on type `[u32; 2]` which implements the `Copy` trait
-   |
-   |
-LL |     x.clone()[0];
-   |     ^^^^^^^^^ help: try dereferencing it: `(*x)`
-error: using `clone` on type `char` which implements the `Copy` trait
-  --> tests/ui/clone_on_copy.rs:67:14
-   |
-   |
-LL |     is_ascii('z'.clone());
-   |              ^^^^^^^^^^^ help: try removing the `clone` call: `'z'`
-error: using `clone` on type `i32` which implements the `Copy` trait
-  --> tests/ui/clone_on_copy.rs:71:14
-   |
-   |
-LL |     vec.push(42.clone());
-   |              ^^^^^^^^^^ help: try removing the `clone` call: `42`
-error: using `clone` on type `Option<i32>` which implements the `Copy` trait
-  --> tests/ui/clone_on_copy.rs:75:17
-   |
-   |
-LL |     let value = opt.clone()?; // operator precedence needed (*opt)?
-   |                 ^^^^^^^^^^^ help: try dereferencing it: `(*opt)`
-error: aborting due to 9 previous errors
-


---
+++ <stderr output>
-error: deref on an immutable reference
-  --> tests/ui/borrow_deref_ref.rs:13:17
-   |
-LL |         let b = &*a;
-   |                 ^^^ help: if you would like to reborrow, try removing `&*`: `a`
-   = note: `-D clippy::borrow-deref-ref` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::borrow_deref_ref)]`
-
-error: deref on an immutable reference
-error: deref on an immutable reference
-  --> tests/ui/borrow_deref_ref.rs:15:22
-   |
-LL |         let b = &mut &*bar(&12);
-   |                      ^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `bar(&12)`
-error: deref on an immutable reference
-  --> tests/ui/borrow_deref_ref.rs:69:23
-   |
-   |
-LL |         let addr_y = &&*x as *const _ as usize; // assert ok
-   |                       ^^^ help: if you would like to reborrow, try removing `&*`: `x`
-error: aborting due to 3 previous errors
-


---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/def_id_nocore.stderr` to the actual output
--- tests/ui/def_id_nocore.stderr
+++ <stderr output>
-error: methods called `as_*` usually take `self` by reference or `self` by mutable reference
-   |
-LL |     pub fn as_ref(self) -> &'static str {
-   |                   ^^^^
-   |
---
-error: aborting due to 1 previous error
-


error: `methods called `as_*` usually take `self` by reference or `self` by mutabl` not found in diagnostics on line 27
   |
   |
28 |         //~^ ERROR: methods called `as_*` usually take `self` by reference or `self` by mutabl
   |


FAILED TEST: tests/ui/derived_hash_with_manual_eq.rs
FAILED TEST: tests/ui/derived_hash_with_manual_eq.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/derived_hash_with_manual_eq.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/derived_hash_with_manual_eq.stderr` to the actual output
--- tests/ui/derived_hash_with_manual_eq.stderr
+++ <stderr output>
-error: you are deriving `Hash` but have implemented `PartialEq` explicitly
-  --> tests/ui/derived_hash_with_manual_eq.rs:12:10
-LL | #[derive(Hash)]
-   |          ^^^^
-   |
-note: `PartialEq` implemented here
-note: `PartialEq` implemented here
-  --> tests/ui/derived_hash_with_manual_eq.rs:16:1
-   |
-LL | impl PartialEq for Bar {
-   | ^^^^^^^^^^^^^^^^^^^^^^
-   = note: `#[deny(clippy::derived_hash_with_manual_eq)]` on by default
-   = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: you are deriving `Hash` but have implemented `PartialEq` explicitly
-  --> tests/ui/derived_hash_with_manual_eq.rs:22:10
-LL | #[derive(Hash)]
-   |          ^^^^
-   |
-note: `PartialEq` implemented here
-note: `PartialEq` implemented here
-  --> tests/ui/derived_hash_with_manual_eq.rs:26:1
-   |
-LL | impl PartialEq<Baz> for Baz {
-   = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 2 previous errors
-
-


error: `you are deriving `Hash` but have implemented `PartialEq` explicitly` not found in diagnostics on line 12
##[error]  --> tests/ui/derived_hash_with_manual_eq.rs:13:13
   |
13 | //~^ ERROR: you are deriving `Hash` but have implemented `PartialEq` explicitly
   |


error: `you are deriving `Hash` but have implemented `PartialEq` explicitly` not found in diagnostics on line 22
##[error]  --> tests/ui/derived_hash_with_manual_eq.rs:23:13
   |
23 | //~^ ERROR: you are deriving `Hash` but have implemented `PartialEq` explicitly
   |


FAILED TEST: tests/ui/derivable_impls.rs
---
-   = note: `-D clippy::derivable-impls` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::derivable_impls)]`
-help: replace the manual implementation with a derive attribute
-   |
-LL + #[derive(Default)]
-LL ~ struct FooDefault<'a> {
-
-error: this `impl` can be derived
-  --> tests/ui/derivable_impls.rs:41:1
-   |
---
-   | |_^
-   |
-help: replace the manual implementation with a derive attribute
-   |
-LL + #[derive(Default)]
-LL ~ struct TupleDefault(bool, i32, u64);
-
-error: this `impl` can be derived
-  --> tests/ui/derivable_impls.rs:93:1
-   |
---
-   | |_^
-   |
-help: replace the manual implementation with a derive attribute
-   |
-LL + #[derive(Default)]
-LL ~ struct StrDefault<'a>(&'a str);
-
-error: this `impl` can be derived
-  --> tests/ui/derivable_impls.rs:119:1
-   |
-   |
-LL | / impl Default for Y {
-LL | |     fn default() -> Self {
-LL | |         Self(mac!())
-LL | | }
-   | |_^
-   |
-help: replace the manual implementation with a derive attribute
-help: replace the manual implementation with a derive attribute
-   |
-LL + #[derive(Default)]
-LL ~ struct Y(u32);
-
-error: this `impl` can be derived
-  --> tests/ui/derivable_impls.rs:158:1
-   |
-   |
-LL | / impl Default for WithoutSelfCurly {
-LL | |     fn default() -> Self {
-LL | |         WithoutSelfCurly { a: false }
-LL | | }
-   | |_^
-   |
-help: replace the manual implementation with a derive attribute
-help: replace the manual implementation with a derive attribute
-   |
-LL + #[derive(Default)]
-LL ~ struct WithoutSelfCurly {
-
-error: this `impl` can be derived
-  --> tests/ui/derivable_impls.rs:166:1
-   |
---
-   | |_^
-   |
-help: replace the manual implementation with a derive attribute
-   |
-LL + #[derive(Default)]
-LL ~ struct WithoutSelfParan(bool);
-
-error: this `impl` can be derived
-  --> tests/ui/derivable_impls.rs:216:1
-   |
-   |
-LL | / impl Default for RepeatDefault1 {
-LL | |     fn default() -> Self {
-LL | |         RepeatDefault1 { a: [0; 32] }
-LL | | }
-   | |_^
-   |
-help: replace the manual implementation with a derive attribute
-help: replace the manual implementation with a derive attribute
-   |
-LL + #[derive(Default)]
-LL ~ pub struct RepeatDefault1 {
-
-error: this `impl` can be derived
-  --> tests/ui/derivable_impls.rs:250:1
-   |
---
-   | |_^
-   |
-help: replace the manual implementation with a derive attribute and mark the default variant
-   |
-LL + #[derive(Default)]
-LL ~ pub enum SimpleEnum {
-LL ~     #[default]
-LL ~     Bar,
-   |
-
---
+++ <stderr output>
-error: this binary expression can be simplified
-  --> tests/ui/double_comparison.rs:6:8
-   |
-LL |     if x == y || x < y {
-   |        ^^^^^^^^^^^^^^^ help: try: `x <= y`
-   = note: `-D clippy::double-comparisons` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::double_comparisons)]`
-
-error: this binary expression can be simplified
-error: this binary expression can be simplified
-  --> tests/ui/double_comparison.rs:9:8
-   |
-LL |     if x < y || x == y {
-   |        ^^^^^^^^^^^^^^^ help: try: `x <= y`
-error: this binary expression can be simplified
-  --> tests/ui/double_comparison.rs:12:8
-   |
-   |
-LL |     if x == y || x > y {
-   |        ^^^^^^^^^^^^^^^ help: try: `x >= y`
-error: this binary expression can be simplified
-  --> tests/ui/double_comparison.rs:15:8
-   |
-   |
-LL |     if x > y || x == y {
-   |        ^^^^^^^^^^^^^^^ help: try: `x >= y`
-error: this binary expression can be simplified
-  --> tests/ui/double_comparison.rs:18:8
-   |
-   |
-LL |     if x < y || x > y {
-   |        ^^^^^^^^^^^^^^ help: try: `x != y`
-error: this binary expression can be simplified
-  --> tests/ui/double_comparison.rs:21:8
-   |
-   |
-LL |     if x > y || x < y {
-   |        ^^^^^^^^^^^^^^ help: try: `x != y`
-error: this binary expression can be simplified
-  --> tests/ui/double_comparison.rs:24:8
-   |
-   |
-LL |     if x <= y && x >= y {
-   |        ^^^^^^^^^^^^^^^^ help: try: `x == y`
-error: this binary expression can be simplified
-  --> tests/ui/double_comparison.rs:27:8
-   |
-   |
-LL |     if x >= y && x <= y {
-   |        ^^^^^^^^^^^^^^^^ help: try: `x == y`
-error: aborting due to 8 previous errors
-


---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/doc_unsafe.stderr` to the actual output
--- tests/ui/doc_unsafe.stderr
+++ <stderr output>
-error: unsafe function's docs are missing a `# Safety` section
-   |
-LL | pub unsafe fn destroy_the_planet() {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   |
-   = note: `-D clippy::missing-safety-doc` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::missing_safety_doc)]`
-
-error: unsafe function's docs are missing a `# Safety` section
-   |
-   |
-LL |     pub unsafe fn republished() {
-
-
-error: unsafe function's docs are missing a `# Safety` section
-   |
-   |
-LL |     unsafe fn woefully_underdocumented(self);
-
-
-error: docs for unsafe trait missing `# Safety` section
-   |
-LL | pub unsafe trait UnsafeTrait {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-
-error: unsafe function's docs are missing a `# Safety` section
-   |
-LL |     pub unsafe fn more_undocumented_unsafe() -> Self {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-
-error: unsafe function's docs are missing a `# Safety` section
-   |
-LL |         pub unsafe fn whee() {
-   |         ^^^^^^^^^^^^^^^^^^^^
-...
-...
-LL | very_unsafe!();
-   |
-   = note: this error originates in the macro `very_unsafe` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 6 previous errors
---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/err_expect.stderr` to the actual output
--- tests/ui/err_expect.stderr
+++ <stderr output>
-error: called `.err().expect()` on a `Result` value
-   |
-   |
-LL |     test_debug.err().expect("Testing debug type");
-   |                ^^^^^^^^^^^^ help: try: `expect_err`
-   = note: `-D clippy::err-expect` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::err_expect)]`
-
-
-error: called `.err().expect()` on a `Result` value
-   |
-   |
-LL |     x.err().expect("17");
-   |       ^^^^^^^^^^^^ help: try: `expect_err`
-error: aborting due to 2 previous errors
-




FAILED TEST: tests/ui/four_forward_slashes_first_line.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--crate-type=lib" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/four_forward_slashes_first_line.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/four_forward_slashes_first_line.stderr` to the actual output
--- tests/ui/four_forward_slashes_first_line.stderr
+++ <stderr output>
+++ <stderr output>
-error: this item has comments with 4 forward slashes (`////`). These look like doc comments, but they aren't
-   |
-   |
-LL | / //// borked doc comment on the first line. doesn't combust!
-LL | | fn a() {}
-   |
-   |
-   = note: `-D clippy::four-forward-slashes` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::four_forward_slashes)]`
-help: make this a doc comment by removing one `/`
-   |
-LL + /// borked doc comment on the first line. doesn't combust!
-
-error: aborting due to 1 previous error
-

---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/infallible_destructuring_match.stderr` to the actual output
--- tests/ui/infallible_destructuring_match.stderr
+++ <stderr output>
-error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
-   |
-LL | /     let data = match wrapper {
-LL | /     let data = match wrapper {
-LL | |         SingleVariantEnum::Variant(i) => i,
-LL | |     };
-   | |______^ help: try: `let SingleVariantEnum::Variant(data) = wrapper;`
-   = note: `-D clippy::infallible-destructuring-match` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::infallible_destructuring_match)]`
-
-
-error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
-   |
-LL | /     let data = match wrapper {
-LL | /     let data = match wrapper {
-LL | |         TupleStruct(i) => i,
-LL | |     };
-   | |______^ help: try: `let TupleStruct(data) = wrapper;`
-
-error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
-   |
-LL | /     let data = match wrapper {
-LL | /     let data = match wrapper {
-LL | |         TupleStructWithNonCopy(ref n) => n,
-LL | |     };
-   | |______^ help: try: `let TupleStructWithNonCopy(ref data) = wrapper;`
-
-error: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
-   |
-LL | /     let data = match wrapper {
-LL | /     let data = match wrapper {
-LL | |         Ok(i) => i,
-LL | |     };
-   | |______^ help: try: `let Ok(data) = wrapper;`
-error: aborting due to 4 previous errors
-


---
-  --> tests/ui/inherent_to_string.rs:22:5
-   |
-LL | /     fn to_string(&self) -> String {
-LL | |
-LL | |         "A.to_string()".to_string()
-   | |_____^
-   |
-   = help: implement trait `Display` for type `A` instead
-   = note: `-D clippy::inherent-to-string` implied by `-D warnings`
-   = note: `-D clippy::inherent-to-string` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::inherent_to_string)]`
-
-error: type `C` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display`
-  --> tests/ui/inherent_to_string.rs:47:5
-   |
-LL | /     fn to_string(&self) -> String {
-LL | |
-LL | |         "C.to_string()".to_string()
-   | |_____^
-   |
-   = help: remove the inherent method from type `C`
-   = note: `#[deny(clippy::inherent_to_string_shadow_display)]` on by default
---
+++ <stderr output>
-error: variables in the condition are not mutated in the loop body
-  --> tests/ui/infinite_loop.rs:22:11
-   |
-LL |     while y < 10 {
-   |
-   = note: this may lead to an infinite or to a never running loop
-   = note: `#[deny(clippy::while_immutable_condition)]` on by default
-
-
-error: variables in the condition are not mutated in the loop body
-  --> tests/ui/infinite_loop.rs:29:11
-   |
-LL |     while y < 10 && x < 3 {
-   |
-   = note: this may lead to an infinite or to a never running loop
-
-error: variables in the condition are not mutated in the loop body
---
-
-error: variables in the condition are not mutated in the loop body
-  --> tests/ui/infinite_loop.rs:91:11
-   |
-LL |     while i < 3 && j > 0 {
-   |
-   = note: this may lead to an infinite or to a never running loop
-
-error: variables in the condition are not mutated in the loop body
---
-
-error: variables in the condition are not mutated in the loop body
-  --> tests/ui/infinite_loop.rs:189:15
-   |
-LL |         while self.count < n {
-   |
-   = note: this may lead to an infinite or to a never running loop
-
-error: variables in the condition are not mutated in the loop body
-error: variables in the condition are not mutated in the loop body
-  --> tests/ui/infinite_loop.rs:199:11
-   |
-LL |     while y < 10 {
-   |
-   = note: this may lead to an infinite or to a never running loop
-   = note: this may lead to an infinite or to a never running loop
-   = note: this loop contains `return`s or `break`s
-   = help: rewrite it as `if cond { loop { } }`
-error: variables in the condition are not mutated in the loop body
-  --> tests/ui/infinite_loop.rs:208:11
-   |
-   |
-LL |     while y < 10 {
-   |
-   = note: this may lead to an infinite or to a never running loop
-   = note: this may lead to an infinite or to a never running loop
-   = note: this loop contains `return`s or `break`s
-   = help: rewrite it as `if cond { loop { } }`
-error: aborting due to 11 previous errors
-



error: `variables in the condition are not mutated in the loop body` not found in diagnostics on line 22
   |
   |
23 |         //~^ ERROR: variables in the condition are not mutated in the loop body
   |

error: `this may lead to an infinite or to a never running loop` not found in diagnostics on line 22
##[error]  --> tests/ui/infinite_loop.rs:24:20
##[error]  --> tests/ui/infinite_loop.rs:24:20
   |
24 |         //~| NOTE: this may lead to an infinite or to a never running loop
   |


error: `variables in the condition are not mutated in the loop body` not found in diagnostics on line 29
   |
   |
30 |         //~^ ERROR: variables in the condition are not mutated in the loop body
   |

error: `this may lead to an infinite or to a never running loop` not found in diagnostics on line 29
##[error]  --> tests/ui/infinite_loop.rs:31:20
##[error]  --> tests/ui/infinite_loop.rs:31:20
   |
31 |         //~| NOTE: this may lead to an infinite or to a never running loop
   |


error: `variables in the condition are not mutated in the loop body` not found in diagnostics on line 38
   |
   |
39 |         //~^ ERROR: variables in the condition are not mutated in the loop body
   |

error: `this may lead to an infinite or to a never running loop` not found in diagnostics on line 38
##[error]  --> tests/ui/infinite_loop.rs:40:20
##[error]  --> tests/ui/infinite_loop.rs:40:20
   |
40 |         //~| NOTE: this may lead to an infinite or to a never running loop
   |


error: `variables in the condition are not mutated in the loop body` not found in diagnostics on line 84
   |
   |
85 |         //~^ ERROR: variables in the condition are not mutated in the loop body
   |

error: `this may lead to an infinite or to a never running loop` not found in diagnostics on line 84
##[error]  --> tests/ui/infinite_loop.rs:86:20
##[error]  --> tests/ui/infinite_loop.rs:86:20
   |
86 |         //~| NOTE: this may lead to an infinite or to a never running loop
   |


error: `variables in the condition are not mutated in the loop body` not found in diagnostics on line 91
   |
   |
92 |         //~^ ERROR: variables in the condition are not mutated in the loop body
   |

error: `this may lead to an infinite or to a never running loop` not found in diagnostics on line 91
##[error]  --> tests/ui/infinite_loop.rs:93:20
##[error]  --> tests/ui/infinite_loop.rs:93:20
   |
93 |         //~| NOTE: this may lead to an infinite or to a never running loop
   |


error: `variables in the condition are not mutated in the loop body` not found in diagnostics on line 97
   |
   |
98 |         //~^ ERROR: variables in the condition are not mutated in the loop body
   |

error: `this may lead to an infinite or to a never running loop` not found in diagnostics on line 97
##[error]  --> tests/ui/infinite_loop.rs:99:20
##[error]  --> tests/ui/infinite_loop.rs:99:20
   |
99 |         //~| NOTE: this may lead to an infinite or to a never running loop
   |


error: `variables in the condition are not mutated in the loop body` not found in diagnostics on line 114
    |
    |
115 |         //~^ ERROR: variables in the condition are not mutated in the loop body
    |

error: `this may lead to an infinite or to a never running loop` not found in diagnostics on line 114
##[error]   --> tests/ui/infinite_loop.rs:116:20
##[error]   --> tests/ui/infinite_loop.rs:116:20
    |
116 |         //~| NOTE: this may lead to an infinite or to a never running loop
    |


error: `variables in the condition are not mutated in the loop body` not found in diagnostics on line 121
    |
    |
122 |         //~^ ERROR: variables in the condition are not mutated in the loop body
    |

error: `this may lead to an infinite or to a never running loop` not found in diagnostics on line 121
##[error]   --> tests/ui/infinite_loop.rs:123:20
##[error]   --> tests/ui/infinite_loop.rs:123:20
    |
123 |         //~| NOTE: this may lead to an infinite or to a never running loop
    |


error: `variables in the condition are not mutated in the loop body` not found in diagnostics on line 189
    |
    |
190 |             //~^ ERROR: variables in the condition are not mutated in the loop body
    |

error: `this may lead to an infinite or to a never running loop` not found in diagnostics on line 189
##[error]   --> tests/ui/infinite_loop.rs:191:24
##[error]   --> tests/ui/infinite_loop.rs:191:24
    |
191 |             //~| NOTE: this may lead to an infinite or to a never running loop
    |


error: `variables in the condition are not mutated in the loop body` not found in diagnostics on line 199
    |
    |
200 |         //~^ ERROR: variables in the condition are not mutated in the loop body
    |

error: `this may lead to an infinite or to a never running loop` not found in diagnostics on line 199
##[error]   --> tests/ui/infinite_loop.rs:201:20
##[error]   --> tests/ui/infinite_loop.rs:201:20
    |
201 |         //~| NOTE: this may lead to an infinite or to a never running loop
    |


error: `variables in the condition are not mutated in the loop body` not found in diagnostics on line 208
    |
    |
209 |         //~^ ERROR: variables in the condition are not mutated in the loop body
    |

error: `this may lead to an infinite or to a never running loop` not found in diagnostics on line 208
##[error]   --> tests/ui/infinite_loop.rs:210:20
##[error]   --> tests/ui/infinite_loop.rs:210:20
    |
210 |         //~| NOTE: this may lead to an infinite or to a never running loop
    |


FAILED TEST: tests/ui/invalid_null_ptr_usage_no_std.rs
---
+++ <stderr output>
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:16:60
-   |
-LL |         let _slice: &[usize] = core::slice::from_raw_parts(core::ptr::null(), 0);
-   |                                                            ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-   = note: `#[deny(clippy::invalid_null_ptr_usage)]` on by default
-
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:17:60
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:17:60
-   |
-LL |         let _slice: &[usize] = core::slice::from_raw_parts(core::ptr::null_mut(), 0);
-   |                                                            ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:19:64
-   |
-   |
-LL |         let _slice: &[usize] = core::slice::from_raw_parts_mut(core::ptr::null_mut(), 0);
-   |                                                                ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:21:34
-   |
-   |
-LL |         core::ptr::copy::<usize>(core::ptr::null(), core::ptr::NonNull::dangling().as_ptr(), 0);
-   |                                  ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:22:75
-   |
-   |
-LL |         core::ptr::copy::<usize>(core::ptr::NonNull::dangling().as_ptr(), core::ptr::null_mut(), 0);
-   |                                                                           ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:24:49
-   |
-   |
-LL |         core::ptr::copy_nonoverlapping::<usize>(core::ptr::null(), core::ptr::NonNull::dangling().as_ptr(), 0);
-   |                                                 ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:25:90
-   |
-LL |         core::ptr::copy_nonoverlapping::<usize>(core::ptr::NonNull::dangling().as_ptr(), core::ptr::null_mut(), 0);
-LL |         core::ptr::copy_nonoverlapping::<usize>(core::ptr::NonNull::dangling().as_ptr(), core::ptr::null_mut(), 0);
-   |                                                                                          ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:30:37
-   |
-LL |         let _a: A = core::ptr::read(core::ptr::null());
-   |                                     ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:31:37
-   |
-   |
-LL |         let _a: A = core::ptr::read(core::ptr::null_mut());
-   |                                     ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:33:47
-   |
-   |
-LL |         let _a: A = core::ptr::read_unaligned(core::ptr::null());
-   |                                               ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:34:47
-   |
-   |
-LL |         let _a: A = core::ptr::read_unaligned(core::ptr::null_mut());
-   |                                               ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:36:46
-   |
-   |
-LL |         let _a: A = core::ptr::read_volatile(core::ptr::null());
-   |                                              ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:37:46
-   |
-   |
-LL |         let _a: A = core::ptr::read_volatile(core::ptr::null_mut());
-   |                                              ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:39:40
-   |
-   |
-LL |         let _a: A = core::ptr::replace(core::ptr::null_mut(), A);
-   |                                        ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:43:30
-   |
-   |
-LL |         core::ptr::swap::<A>(core::ptr::null_mut(), &mut A);
-   |                              ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:44:38
-   |
-   |
-LL |         core::ptr::swap::<A>(&mut A, core::ptr::null_mut());
-   |                                      ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:46:45
-   |
-   |
-LL |         core::ptr::swap_nonoverlapping::<A>(core::ptr::null_mut(), &mut A, 0);
-   |                                             ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:47:53
-   |
-   |
-LL |         core::ptr::swap_nonoverlapping::<A>(&mut A, core::ptr::null_mut(), 0);
-   |                                                     ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage_no_std.rs:49:26
-   |
-LL |         core::ptr::write(core::ptr::null_mut(), A);
---
+++ <stderr output>
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:3:59
-   |
-LL |         let _slice: &[usize] = std::slice::from_raw_parts(std::ptr::null(), 0);
-   |                                                           ^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-   = note: `#[deny(clippy::invalid_null_ptr_usage)]` on by default
-
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:4:59
-  --> tests/ui/invalid_null_ptr_usage.rs:4:59
-   |
-LL |         let _slice: &[usize] = std::slice::from_raw_parts(std::ptr::null_mut(), 0);
-   |                                                           ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:6:63
-   |
-   |
-LL |         let _slice: &[usize] = std::slice::from_raw_parts_mut(std::ptr::null_mut(), 0);
-   |                                                               ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:8:33
-   |
-   |
-LL |         std::ptr::copy::<usize>(std::ptr::null(), std::ptr::NonNull::dangling().as_ptr(), 0);
-   |                                 ^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:9:73
-   |
-   |
-LL |         std::ptr::copy::<usize>(std::ptr::NonNull::dangling().as_ptr(), std::ptr::null_mut(), 0);
-   |                                                                         ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:11:48
-   |
-   |
-LL |         std::ptr::copy_nonoverlapping::<usize>(std::ptr::null(), std::ptr::NonNull::dangling().as_ptr(), 0);
-   |                                                ^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:12:88
-   |
-LL |         std::ptr::copy_nonoverlapping::<usize>(std::ptr::NonNull::dangling().as_ptr(), std::ptr::null_mut(), 0);
-LL |         std::ptr::copy_nonoverlapping::<usize>(std::ptr::NonNull::dangling().as_ptr(), std::ptr::null_mut(), 0);
-   |                                                                                        ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:17:36
-   |
-LL |         let _a: A = std::ptr::read(std::ptr::null());
-   |                                    ^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:18:36
-   |
-   |
-LL |         let _a: A = std::ptr::read(std::ptr::null_mut());
-   |                                    ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:20:46
-   |
-   |
-LL |         let _a: A = std::ptr::read_unaligned(std::ptr::null());
-   |                                              ^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:21:46
-   |
-   |
-LL |         let _a: A = std::ptr::read_unaligned(std::ptr::null_mut());
-   |                                              ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:23:45
-   |
-   |
-LL |         let _a: A = std::ptr::read_volatile(std::ptr::null());
-   |                                             ^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:24:45
-   |
-   |
-LL |         let _a: A = std::ptr::read_volatile(std::ptr::null_mut());
-   |                                             ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:26:39
-   |
-   |
-LL |         let _a: A = std::ptr::replace(std::ptr::null_mut(), A);
-   |                                       ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:30:29
-   |
-   |
-LL |         std::ptr::swap::<A>(std::ptr::null_mut(), &mut A);
-   |                             ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:31:37
-   |
-   |
-LL |         std::ptr::swap::<A>(&mut A, std::ptr::null_mut());
-   |                                     ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:33:44
-   |
-   |
-LL |         std::ptr::swap_nonoverlapping::<A>(std::ptr::null_mut(), &mut A, 0);
-   |                                            ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:34:52
-   |
-   |
-LL |         std::ptr::swap_nonoverlapping::<A>(&mut A, std::ptr::null_mut(), 0);
-   |                                                    ^^^^^^^^^^^^^^^^^^^^ help: change this to: `std::ptr::NonNull::dangling().as_ptr()`
-error: pointer must be non-null
-  --> tests/ui/invalid_null_ptr_usage.rs:36:25
-   |
-LL |         std::ptr::write(std::ptr::null_mut(), A);
---
-error: aborting due to 2 previous errors
-


error: `sub-expression diverges` not found in diagnostics on line 26
   |
27 |     //~^ ERROR: sub-expression diverges
   |                 ^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
   |

error: ``-D clippy::diverging-sub-expression` implied by `-D warnings`` not found in diagnostics on line 26
   |
   |
28 |     //~| NOTE: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   |


error: `sub-expression diverges` not found in diagnostics on line 29
   |
30 |     //~^ ERROR: sub-expression diverges
   |                 ^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
   |


FAILED TEST: tests/ui/issue_4266.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/issue_4266.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/issue_4266.stderr` to the actual output
--- tests/ui/issue_4266.stderr
-error: the following explicit lifetimes could be elided: 'a
-  --> tests/ui/issue_4266.rs:4:16
-   |
-   |
-LL | async fn sink1<'a>(_: &'a str) {} // lint
-   |
-   = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
-
-
-error: the following explicit lifetimes could be elided: 'a
-  --> tests/ui/issue_4266.rs:10:21
-   |
-LL | async fn one_to_one<'a>(s: &'a str) -> &'a str {
-
-error: methods called `new` usually take no `self`
-  --> tests/ui/issue_4266.rs:31:22
-   |
---
5 | //~^ ERROR: the following explicit lifetimes could be elided: 'a
  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
  |

error: ``-D clippy::needless-lifetimes` implied by `-D warnings`` not found in diagnostics on line 4
  |
  |
6 | //~| NOTE: `-D clippy::needless-lifetimes` implied by `-D warnings`
  |

error: `the following explicit lifetimes could be elided: 'a` not found in diagnostics on line 10
##[error]  --> tests/ui/issue_4266.rs:11:17
##[error]  --> tests/ui/issue_4266.rs:11:17
   |
11 |     //~^ ERROR: the following explicit lifetimes could be elided: 'a
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |

error: `methods called `new` usually take no `self`` not found in diagnostics on line 31
   |
   |
32 |         //~^ ERROR: methods called `new` usually take no `self`
   |


FAILED TEST: tests/ui/iter_cloned_collect.rs
FAILED TEST: tests/ui/iter_cloned_collect.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/iter_cloned_collect.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/iter_cloned_collect.stderr` to the actual output
--- tests/ui/iter_cloned_collect.stderr
+++ <stderr output>
-error: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
-   |
-   |
-LL |     let v2: Vec<isize> = v.iter().cloned().collect();
-   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
-   = note: `-D clippy::iter-cloned-collect` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::iter_cloned_collect)]`
-
-
-error: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
-   |
-   |
-LL |     let _: Vec<isize> = vec![1, 2, 3].iter().cloned().collect();
-   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
-
-error: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
-   |
-LL |               .to_bytes()
-   |  ________________________^
-LL | |             .iter()
-LL | |             .iter()
-LL | |             .cloned()
-LL | |             .collect();
-   | |______________________^ help: try: `.to_vec()`
-
-error: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
-   |
-   |
-LL |     let _: Vec<_> = arr.iter().cloned().collect();
-   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
-
-error: called `iter().copied().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
-   |
-   |
-LL |     let _: Vec<isize> = v.iter().copied().collect();
-   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
-error: aborting due to 5 previous errors
-


---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/len_without_is_empty.stderr` to the actual output
--- tests/ui/len_without_is_empty.stderr
+++ <stderr output>
 error: struct `PubOne` has a public `len` method, but no `is_empty` method
... 87 lines skipped ...
... 87 lines skipped ...
    = note: expected signature: `(&self) -> bool` or `(&self) -> Result<bool>
-error: this returns a `Result<_, ()>`
-  --> tests/ui/len_without_is_empty.rs:236:5
-   |
-   |
-LL |     pub fn len(&self) -> Result<usize, ()> {
-   |
-   = help: use a custom `Error` type instead
-   = note: `-D clippy::result-unit-err` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::result_unit_err)]`
-   = help: to override `-D warnings` add `#[allow(clippy::result_unit_err)]`
-
-error: this returns a `Result<_, ()>`
-  --> tests/ui/len_without_is_empty.rs:250:5
-   |
-LL |     pub fn len(&self) -> Result<usize, ()> {
-   |
-   = help: use a custom `Error` type instead
-
-error: this returns a `Result<_, ()>`
---
-
-error: this returns a `Result<_, ()>`
-  --> tests/ui/len_without_is_empty.rs:263:5
-   |
-LL |     pub fn len(&self) -> Result<usize, ()> {
-   |
-   = help: use a custom `Error` type instead
-
-
 error: struct `AsyncLenWithoutIsEmpty` has a public `len` method, but no `is_empty` method
... 20 lines skipped ...
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 16 previous errors
-error: aborting due to 16 previous errors
+error: aborting due to 12 previous errors
 


error: `this returns a `Result<_, ()>`` not found in diagnostics on line 236
##[error]   --> tests/ui/len_without_is_empty.rs:238:21
    |
238 |         //~| ERROR: this returns a `Result<_, ()>`
    |

error: `this returns a `Result<_, ()>`` not found in diagnostics on line 250
##[error]   --> tests/ui/len_without_is_empty.rs:251:21
---
+++ <stderr output>
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:6:13
-   |
-LL |     let _ = 1u32.checked_add(1).unwrap_or(u32::max_value());
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_add`: `1u32.saturating_add(1)`
-   = note: `-D clippy::manual-saturating-arithmetic` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::manual_saturating_arithmetic)]`
-
-error: manual saturating arithmetic
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:7:13
-   |
-LL |     let _ = 1u32.checked_add(1).unwrap_or(u32::MAX);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_add`: `1u32.saturating_add(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:8:13
-   |
-   |
-LL |     let _ = 1u8.checked_add(1).unwrap_or(255);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_add`: `1u8.saturating_add(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:9:13
-   |
-LL |       let _ = 1u128
-LL |       let _ = 1u128
-   |  _____________^
-LL | |         .checked_add(1)
-LL | |         .unwrap_or(340_282_366_920_938_463_463_374_607_431_768_211_455);
-   | |_______________________________________________________________________^ help: consider using `saturating_add`: `1u128.saturating_add(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:14:13
-   |
-   |
-LL |     let _ = 1u32.checked_mul(1).unwrap_or(u32::MAX);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_mul`: `1u32.saturating_mul(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:16:13
-   |
-   |
-LL |     let _ = 1u32.checked_sub(1).unwrap_or(u32::min_value());
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `1u32.saturating_sub(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:17:13
-   |
-   |
-LL |     let _ = 1u32.checked_sub(1).unwrap_or(u32::MIN);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `1u32.saturating_sub(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:18:13
-   |
-   |
-LL |     let _ = 1u8.checked_sub(1).unwrap_or(0);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `1u8.saturating_sub(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:22:13
-   |
-   |
-LL |     let _ = 1i32.checked_add(1).unwrap_or(i32::max_value());
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_add`: `1i32.saturating_add(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:23:13
-   |
-   |
-LL |     let _ = 1i32.checked_add(1).unwrap_or(i32::MAX);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_add`: `1i32.saturating_add(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:24:13
-   |
-   |
-LL |     let _ = 1i8.checked_add(1).unwrap_or(127);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_add`: `1i8.saturating_add(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:25:13
-   |
-LL |       let _ = 1i128
-LL |       let _ = 1i128
-   |  _____________^
-LL | |         .checked_add(1)
-LL | |         .unwrap_or(170_141_183_460_469_231_731_687_303_715_884_105_727);
-   | |_______________________________________________________________________^ help: consider using `saturating_add`: `1i128.saturating_add(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:28:13
-   |
-   |
-LL |     let _ = 1i32.checked_add(-1).unwrap_or(i32::min_value());
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_add`: `1i32.saturating_add(-1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:29:13
-   |
-   |
-LL |     let _ = 1i32.checked_add(-1).unwrap_or(i32::MIN);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_add`: `1i32.saturating_add(-1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:30:13
-   |
-   |
-LL |     let _ = 1i8.checked_add(-1).unwrap_or(-128);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_add`: `1i8.saturating_add(-1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:31:13
-   |
-LL |       let _ = 1i128
-LL |       let _ = 1i128
-   |  _____________^
-LL | |         .checked_add(-1)
-LL | |         .unwrap_or(-170_141_183_460_469_231_731_687_303_715_884_105_728);
-   | |________________________________________________________________________^ help: consider using `saturating_add`: `1i128.saturating_add(-1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:38:13
-   |
-   |
-LL |     let _ = 1i32.checked_sub(1).unwrap_or(i32::min_value());
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `1i32.saturating_sub(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:39:13
-   |
-   |
-LL |     let _ = 1i32.checked_sub(1).unwrap_or(i32::MIN);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `1i32.saturating_sub(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:40:13
-   |
-   |
-LL |     let _ = 1i8.checked_sub(1).unwrap_or(-128);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `1i8.saturating_sub(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:41:13
-   |
-LL |       let _ = 1i128
-LL |       let _ = 1i128
-   |  _____________^
-LL | |         .checked_sub(1)
-LL | |         .unwrap_or(-170_141_183_460_469_231_731_687_303_715_884_105_728);
-   | |________________________________________________________________________^ help: consider using `saturating_sub`: `1i128.saturating_sub(1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:44:13
-   |
-   |
-LL |     let _ = 1i32.checked_sub(-1).unwrap_or(i32::max_value());
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `1i32.saturating_sub(-1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:45:13
-   |
-   |
-LL |     let _ = 1i32.checked_sub(-1).unwrap_or(i32::MAX);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `1i32.saturating_sub(-1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:46:13
-   |
-   |
-LL |     let _ = 1i8.checked_sub(-1).unwrap_or(127);
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `1i8.saturating_sub(-1)`
-error: manual saturating arithmetic
-  --> tests/ui/manual_saturating_arithmetic.rs:47:13
-   |
-LL |       let _ = 1i128
-LL |       let _ = 1i128
-   |  _____________^
-LL | |         .checked_sub(-1)
-LL | |         .unwrap_or(170_141_183_460_469_231_731_687_303_715_884_105_727);
-   | |_______________________________________________________________________^ help: consider using `saturating_sub`: `1i128.saturating_sub(-1)`
-error: aborting due to 24 previous errors
-


---
-LL | /     match Some(1) {
-LL | |         Some(i) => i,
-LL | |         None => 1 + 42,
-LL | |     };
-   | |_____^ help: replace with: `Some(1).unwrap_or(1 + 42)`
-error: this pattern reimplements `Option::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:30:5
-   |
-LL | /     match Some(1) {
---
-
-error: this pattern reimplements `Option::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:40:5
-   |
-LL | /     match Some("Bob") {
-LL | |         Some(i) => i,
-LL | |         None => "Alice",
-LL | |     };
-   | |_____^ help: replace with: `Some("Bob").unwrap_or("Alice")`
-error: this pattern reimplements `Option::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:87:5
-   |
-LL | /     if let Some(x) = Some(1) {
---
-
-error: this pattern reimplements `Result::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:120:5
-   |
-LL | /     match Ok::<i32, &str>(1) {
-LL | |         Ok(i) => i,
-LL | |         Err(_) => 42,
-LL | |     };
-   | |_____^ help: replace with: `Ok::<i32, &str>(1).unwrap_or(42)`
-error: this pattern reimplements `Result::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:127:5
-   |
-LL | /     match a {
-LL | /     match a {
-LL | |         Ok(i) => i,
-LL | |         Err(_) => 42,
-LL | |     };
-   | |_____^ help: replace with: `a.unwrap_or(42)`
-error: this pattern reimplements `Result::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:133:5
-   |
-   |
-LL | /     match Ok(1) as Result<i32, &str> {
-LL | |         Ok(i) => i,
-LL | |         Err(_) => 42,
-LL | |     };
-   | |_____^ help: replace with: `(Ok(1) as Result<i32, &str>).unwrap_or(42)`
-error: this pattern reimplements `Option::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:146:5
-   |
-LL | /     match s.method() {
-LL | /     match s.method() {
-LL | |         Some(i) => i,
-LL | |         None => 42,
-LL | |     };
-   | |_____^ help: replace with: `s.method().unwrap_or(42)`
-error: this pattern reimplements `Result::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:152:5
-   |
-   |
-LL | /     match Ok::<i32, &str>(1) {
-LL | |         Err(_) => 42,
-LL | |         Ok(i) => i,
-LL | |     };
-   | |_____^ help: replace with: `Ok::<i32, &str>(1).unwrap_or(42)`
-error: this pattern reimplements `Result::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:158:5
-   |
-   |
-LL | /     match Ok::<i32, &str>(1) {
-LL | |         Ok(i) => i,
-LL | |         Err(_) => 1 + 42,
-LL | |     };
-   | |_____^ help: replace with: `Ok::<i32, &str>(1).unwrap_or(1 + 42)`
-error: this pattern reimplements `Result::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:165:5
-   |
-   |
-LL | /     match Ok::<i32, &str>(1) {
-LL | |         Ok(i) => i,
-LL | |             42 + 42
-...  |
-LL | |         }
-LL | |     };
-LL | |     };
-   | |_____^
-   |
-help: replace with
-   |
-LL ~     Ok::<i32, &str>(1).unwrap_or({
-LL +         42 + 42
-LL +             + 42 + 42 + 42
-LL +             + 42 + 42 + 42
-LL ~     });
-
-error: this pattern reimplements `Result::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:175:5
-   |
-   |
-LL | /     match Ok::<&str, &str>("Bob") {
-LL | |         Ok(i) => i,
-LL | |         Err(_) => "Alice",
-LL | |     };
-   | |_____^ help: replace with: `Ok::<&str, &str>("Bob").unwrap_or("Alice")`
-error: this pattern reimplements `Result::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:211:5
-   |
-LL | /     if let Ok(x) = Ok::<i32, i32>(1) {
-LL | /     if let Ok(x) = Ok::<i32, i32>(1) {
-LL | |         x
-LL | |     } else {
-LL | |         42
-LL | |     };
-   | |_____^ help: replace with: `Ok::<i32, i32>(1).unwrap_or(42)`
-error: this pattern reimplements `Option::unwrap_or`
-  --> tests/ui/manual_unwrap_or.rs:265:17
-   |
-LL |           let _ = match some_macro!() {
-LL |           let _ = match some_macro!() {
-   |  _________________^
-LL | |             Some(val) => val,
-LL | |             None => 0,
-LL | |         };
-   | |_________^ help: replace with: `some_macro!().unwrap_or(0)`
-error: aborting due to 16 previous errors
-


---
-   |
-LL |     match test && test {
-   |           ^^^^^^^^^^^^
-   |
-   = note: `#[deny(clippy::eq_op)]` on by default
 error: you seem to be trying to match on a boolean expression
   --> tests/ui/match_bool.rs:48:5
... 17 lines skipped ...
    |
---
37 |         //~^ ERROR: this boolean expression can be simplified
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |

error: ``-D clippy::nonminimal-bool` implied by `-D warnings`` not found in diagnostics on line 36
   |
   |
38 |         //~| NOTE: `-D clippy::nonminimal-bool` implied by `-D warnings`
   |


error: `equal expressions as operands to `&&`` not found in diagnostics on line 36
   |
   |
40 |         //~| ERROR: equal expressions as operands to `&&`
   |


error: ``#[deny(clippy::eq_op)]` on by default` not found in diagnostics on line 36
   |
   |
41 |         //~| NOTE: `#[deny(clippy::eq_op)]` on by default
   |


FAILED TEST: tests/ui/min_rust_version_attr.rs
FAILED TEST: tests/ui/min_rust_version_attr.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/min_rust_version_attr.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/min_rust_version_attr.stderr` to the actual output
--- tests/ui/min_rust_version_attr.stderr
+++ <stderr output>
-error: approximate value of `f{32, 64}::consts::LOG2_10` found
-   |
-LL |     let log2_10 = 3.321928094887362;
-   |                   ^^^^^^^^^^^^^^^^^
-   |
-   |
-   = help: consider using the constant directly
-   = note: `#[deny(clippy::approx_constant)]` on by default
-
-error: approximate value of `f{32, 64}::consts::LOG2_10` found
-   |
-LL |     let log2_10 = 3.321928094887362;
-   |                   ^^^^^^^^^^^^^^^^^
-   |
-   |
-   = help: consider using the constant directly
-
-error: approximate value of `f{32, 64}::consts::LOG2_10` found
-   |
-LL |     let log2_10 = 3.321928094887362;
-   |                   ^^^^^^^^^^^^^^^^^
-   |
-   |
-   = help: consider using the constant directly
-
-error: approximate value of `f{32, 64}::consts::LOG2_10` found
-   |
-LL |     let log2_10 = 3.321928094887362;
-   |                   ^^^^^^^^^^^^^^^^^
-   |
-   |
-   = help: consider using the constant directly
-
-error: approximate value of `f{32, 64}::consts::LOG2_10` found
-   |
-LL |     let log2_10 = 3.321928094887362;
-   |                   ^^^^^^^^^^^^^^^^^
-   |
-   |
-   = help: consider using the constant directly
-
-error: approximate value of `f{32, 64}::consts::LOG2_10` found
-   |
-LL |             let log2_10 = 3.321928094887362;
-   |                           ^^^^^^^^^^^^^^^^^
-   |
-   |
-   = help: consider using the constant directly
-
-error: aborting due to 6 previous errors
-


error: `approximate value of `f{32, 64}::consts::LOG2_10` found` not found in diagnostics on line 13
   |
   |
14 |     //~^ ERROR: approximate value of `f{32, 64}::consts::LOG2_10` found
   |


error: `approximate value of `f{32, 64}::consts::LOG2_10` found` not found in diagnostics on line 19
   |
   |
20 |     //~^ ERROR: approximate value of `f{32, 64}::consts::LOG2_10` found
   |


error: `approximate value of `f{32, 64}::consts::LOG2_10` found` not found in diagnostics on line 30
   |
   |
31 |     //~^ ERROR: approximate value of `f{32, 64}::consts::LOG2_10` found
   |


error: `approximate value of `f{32, 64}::consts::LOG2_10` found` not found in diagnostics on line 41
   |
   |
42 |     //~^ ERROR: approximate value of `f{32, 64}::consts::LOG2_10` found
   |


error: `approximate value of `f{32, 64}::consts::LOG2_10` found` not found in diagnostics on line 52
   |
   |
53 |     //~^ ERROR: approximate value of `f{32, 64}::consts::LOG2_10` found
   |


error: `approximate value of `f{32, 64}::consts::LOG2_10` found` not found in diagnostics on line 60
   |
   |
61 |             //~^ ERROR: approximate value of `f{32, 64}::consts::LOG2_10` found
   |


FAILED TEST: tests/ui/mut_range_bound.rs
---

error: `the range of the loop is unchanged` not found in diagnostics on line 8
##[error]  --> tests/ui/mut_range_bound.rs:10:20
   |
10 |         //~| NOTE: the range of the loop is unchanged
   |

error: `attempt to mutate range bound within loop` not found in diagnostics on line 17
##[error]  --> tests/ui/mut_range_bound.rs:18:21
---

error: `the range of the loop is unchanged` not found in diagnostics on line 17
##[error]  --> tests/ui/mut_range_bound.rs:19:20
   |
19 |         //~| NOTE: the range of the loop is unchanged
   |

error: `attempt to mutate range bound within loop` not found in diagnostics on line 27
##[error]  --> tests/ui/mut_range_bound.rs:28:21
---

error: `the range of the loop is unchanged` not found in diagnostics on line 27
##[error]  --> tests/ui/mut_range_bound.rs:29:20
   |
29 |         //~| NOTE: the range of the loop is unchanged
   |

error: `attempt to mutate range bound within loop` not found in diagnostics on line 30
##[error]  --> tests/ui/mut_range_bound.rs:31:21
---

error: `the range of the loop is unchanged` not found in diagnostics on line 30
##[error]  --> tests/ui/mut_range_bound.rs:32:20
   |
32 |         //~| NOTE: the range of the loop is unchanged
   |

error: `attempt to mutate range bound within loop` not found in diagnostics on line 46
##[error]  --> tests/ui/mut_range_bound.rs:47:21
---

error: `the range of the loop is unchanged` not found in diagnostics on line 46
##[error]  --> tests/ui/mut_range_bound.rs:48:20
   |
48 |         //~| NOTE: the range of the loop is unchanged
   |

error: `attempt to mutate range bound within loop` not found in diagnostics on line 81
##[error]  --> tests/ui/mut_range_bound.rs:82:21
---

error: `the range of the loop is unchanged` not found in diagnostics on line 81
##[error]  --> tests/ui/mut_range_bound.rs:83:20
   |
83 |         //~| NOTE: the range of the loop is unchanged
   |

error: `attempt to mutate range bound within loop` not found in diagnostics on line 93
##[error]  --> tests/ui/mut_range_bound.rs:94:25
---

error: `the range of the loop is unchanged` not found in diagnostics on line 93
##[error]  --> tests/ui/mut_range_bound.rs:95:24
   |
95 |             //~| NOTE: the range of the loop is unchanged
   |


FAILED TEST: tests/ui/mut_key.rs
---
-   |
-LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> HashSet<Key> {
-   |                                ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `Key`, which has interior mutability
-   = note: ... because it contains `AtomicUsize`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-   = help: to override `-D warnings` add `#[allow(clippy::mutable_key_type)]`
-
-error: mutable key type
-  --> tests/ui/mut_key.rs:31:72
-  --> tests/ui/mut_key.rs:31:72
-   |
-LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> HashSet<Key> {
-   |                                                                        ^^^^^^^^^^^^
-   |
-   = note: ... because it contains `Key`, which has interior mutability
-   = note: ... because it contains `AtomicUsize`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:35:5
-   |
-LL |     let _other: HashMap<Key, bool> = HashMap::new();
-LL |     let _other: HashMap<Key, bool> = HashMap::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `Key`, which has interior mutability
-   = note: ... because it contains `AtomicUsize`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:63:22
-   |
-LL | fn tuples_bad<U>(_m: &mut HashMap<(Key, U), bool>) {}
-LL | fn tuples_bad<U>(_m: &mut HashMap<(Key, U), bool>) {}
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `(Key, U)`, which has interior mutability
-   = note: ... because it contains `Key`, which has interior mutability
-   = note: ... because it contains `AtomicUsize`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:76:5
-   |
-LL |     let _map = HashMap::<Cell<usize>, usize>::new();
-LL |     let _map = HashMap::<Cell<usize>, usize>::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `Cell<usize>`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:78:5
-   |
-LL |     let _map = HashMap::<&mut Cell<usize>, usize>::new();
-LL |     let _map = HashMap::<&mut Cell<usize>, usize>::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `&mut Cell<usize>`, which has interior mutability
-   = note: ... because it contains `Cell<usize>`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:81:5
-   |
-LL |     let _map = HashMap::<Vec<Cell<usize>>, usize>::new();
-LL |     let _map = HashMap::<Vec<Cell<usize>>, usize>::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `Vec<Cell<usize>>`, which has interior mutability
-   = note: ... because it contains `Cell<usize>`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:83:5
-   |
-LL |     let _map = HashMap::<BTreeMap<Cell<usize>, ()>, usize>::new();
-LL |     let _map = HashMap::<BTreeMap<Cell<usize>, ()>, usize>::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `BTreeMap<Cell<usize>, ()>`, which has interior mutability
-   = note: ... because it contains `Cell<usize>`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:85:5
-   |
-LL |     let _map = HashMap::<BTreeMap<(), Cell<usize>>, usize>::new();
-LL |     let _map = HashMap::<BTreeMap<(), Cell<usize>>, usize>::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `BTreeMap<(), Cell<usize>>`, which has interior mutability
-   = note: ... because it contains `Cell<usize>`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:87:5
-   |
-LL |     let _map = HashMap::<BTreeSet<Cell<usize>>, usize>::new();
-LL |     let _map = HashMap::<BTreeSet<Cell<usize>>, usize>::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `BTreeSet<Cell<usize>>`, which has interior mutability
-   = note: ... because it contains `Cell<usize>`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:89:5
-   |
-LL |     let _map = HashMap::<Option<Cell<usize>>, usize>::new();
-LL |     let _map = HashMap::<Option<Cell<usize>>, usize>::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `Option<Cell<usize>>`, which has interior mutability
-   = note: ... because it contains `Cell<usize>`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:91:5
-   |
-LL |     let _map = HashMap::<Option<Vec<Cell<usize>>>, usize>::new();
-LL |     let _map = HashMap::<Option<Vec<Cell<usize>>>, usize>::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `Option<Vec<Cell<usize>>>`, which has interior mutability
-   = note: ... because it contains `Vec<Cell<usize>>`, which has interior mutability
-   = note: ... because it contains `Cell<usize>`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:94:5
-   |
-LL |     let _map = HashMap::<Box<Cell<usize>>, usize>::new();
-LL |     let _map = HashMap::<Box<Cell<usize>>, usize>::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `Box<Cell<usize>>`, which has interior mutability
-   = note: ... because it contains `Cell<usize>`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:96:5
-   |
-LL |     let _map = HashMap::<Rc<Cell<usize>>, usize>::new();
-LL |     let _map = HashMap::<Rc<Cell<usize>>, usize>::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `Rc<Cell<usize>>`, which has interior mutability
-   = note: ... because it contains `Cell<usize>`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: mutable key type
-  --> tests/ui/mut_key.rs:98:5
-   |
-LL |     let _map = HashMap::<Arc<Cell<usize>>, usize>::new();
-LL |     let _map = HashMap::<Arc<Cell<usize>>, usize>::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: ... because it contains `Arc<Cell<usize>>`, which has interior mutability
-   = note: ... because it contains `Cell<usize>`, which has interior mutability
-   = note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
-error: aborting due to 15 previous errors
-



error: `mutable key type` not found in diagnostics on line 31
##[error]  --> tests/ui/mut_key.rs:32:17
   |
32 |     //~^ ERROR: mutable key type
   |                 ^^^^^^^^^^^^^^^^ expected because of this pattern
   |

error: ``-D clippy::mutable-key-type` implied by `-D warnings`` not found in diagnostics on line 31
   |
   |
33 |     //~| NOTE: `-D clippy::mutable-key-type` implied by `-D warnings`
   |

error: `mutable key type` not found in diagnostics on line 31
##[error]  --> tests/ui/mut_key.rs:34:17
---
+++ <stderr output>
 error: this if-then-else expression assigns a bool literal
   --> tests/ui/needless_bool_assign.rs:13:5
... 29 lines skipped ...
    | |_____^ help: you can reduce it to: `random(); a.field = true;`
-error: this `if` has identical blocks
+error: aborting due to 3 previous errors
 
-error: aborting due to 4 previous errors
---
-error: aborting due to 4 previous errors
-


error: `needless `fn main` in doctest` not found in diagnostics on line 7
  |
  |
8 | //~^ ERROR: needless `fn main` in doctest
  |


error: ``-D clippy::needless-doctest-main` implied by `-D warnings`` not found in diagnostics on line 7
  |
  |
9 | //~| NOTE: `-D clippy::needless-doctest-main` implied by `-D warnings`
  |


error: `needless `fn main` in doctest` not found in diagnostics on line 16
   |
   |
17 | //~^ ERROR: needless `fn main` in doctest
   |


error: `needless `fn main` in doctest` not found in diagnostics on line 24
   |
   |
25 | //~^ ERROR: needless `fn main` in doctest
   |


error: `needless `fn main` in doctest` not found in diagnostics on line 32
   |
   |
33 | //~^ ERROR: needless `fn main` in doctest
   |


FAILED TEST: tests/ui/needless_late_init.rs
---
+++ <stderr output>
-error: unneeded late initialization
-  --> tests/ui/needless_late_init.rs:27:5
-   |
-LL |     let a;
-   |     ^^^^^^ created here
-LL |     a = "zero";
-   |     ^^^^^^^^^^ initialised here
-   = note: `-D clippy::needless-late-init` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::needless_late_init)]`
-help: move the declaration `a` here
-   |
-   |
-LL ~     
-LL ~     let a = "zero";
-
-error: unneeded late initialization
-  --> tests/ui/needless_late_init.rs:30:5
-   |
---
-   |     ^^^^^ initialised here
-   |
-help: move the declaration `d` here
-   |
-LL ~     
-LL ~     let d: usize = 1;
-
-error: unneeded late initialization
-  --> tests/ui/needless_late_init.rs:38:5
-   |
-   |
-LL |     let e;
-   |     ^^^^^^ created here
-LL |     e = format!("{}", d);
-   |     ^^^^^^^^^^^^^^^^^^^^ initialised here
-   |
-help: move the declaration `e` here
-   |
-LL ~     
-LL ~     let e = format!("{}", d);
-
-error: unneeded late initialization
-  --> tests/ui/needless_late_init.rs:43:5
-   |
-   |
-LL |     let a;
-   |     ^^^^^^
-   |
-help: move the declaration `a` here and remove the assignments from the `match` arms
-   |
-LL ~     
-LL |     let n = 1;
-LL ~     let a = match n {
-LL ~         1 => "one",
-LL |         _ => {
-LL ~             "two"
-LL ~     };
-   |
-
-error: unneeded late initialization
-error: unneeded late initialization
-  --> tests/ui/needless_late_init.rs:52:5
-   |
-LL |     let b;
-   |     ^^^^^^
-   |
-help: move the declaration `b` here and remove the assignments from the branches
-   |
-LL ~     
-LL ~     let b = if n == 3 {
-LL ~         "four"
-LL |     } else {
-LL ~         "five"
-LL ~     };
-
-error: unneeded late initialization
-  --> tests/ui/needless_late_init.rs:59:5
-   |
-   |
-LL |     let d;
-   |     ^^^^^^
-   |
-help: move the declaration `d` here and remove the assignments from the branches
-   |
-LL ~     
-LL ~     let d = if true {
-LL ~         temp
-LL |     } else {
-LL ~         15
-LL ~     };
---
-   |     ^^^^^^
-   |
-help: move the declaration `e` here and remove the assignments from the branches
-   |
-LL ~     
-LL ~     let e = if true {
-LL ~         format!("{} {}", a, b)
-LL ~         format!("{}", n)
-LL ~     };
-   |
-
---
-   |     ^^^^^^
-   |
-help: move the declaration `f` here and remove the assignments from the `match` arms
-   |
-LL ~     
-LL ~     let f = match 1 {
-LL ~         1 => "three",
-
-error: unneeded late initialization
-  --> tests/ui/needless_late_init.rs:80:5
-   |
-   |
-LL |     let g: usize;
-   |     ^^^^^^^^^^^^^
-   |
-help: move the declaration `g` here and remove the assignments from the branches
-   |
-LL ~     
-LL ~     let g: usize = if true {
-LL ~         5
-LL |         panic!();
-LL ~     };
-   |
-
-
-error: unneeded late initialization
-  --> tests/ui/needless_late_init.rs:88:5
-   |
-LL |     let x;
-   |     ^^^^^^ created here
-LL |     let y = SignificantDrop;
-   |     ^^^^^ initialised here
-   |
-help: move the declaration `x` here
-   |
-   |
-LL ~     
-LL |     let y = SignificantDrop;
-LL ~     let x = 1;
-
-error: unneeded late initialization
-  --> tests/ui/needless_late_init.rs:92:5
-   |
-   |
-LL |     let x;
-   |     ^^^^^^ created here
-LL |     let y = 1;
-LL |     x = SignificantDrop;
-   |     ^^^^^^^^^^^^^^^^^^^ initialised here
-help: move the declaration `x` here
-   |
-LL ~     
-LL |     let y = 1;
-LL |     let y = 1;
-LL ~     let x = SignificantDrop;
-
-error: unneeded late initialization
-  --> tests/ui/needless_late_init.rs:96:5
-   |
-   |
-LL |     let x;
-   |     ^^^^^^ created here
-...
-LL |     x = SignificantDrop;
-   |     ^^^^^^^^^^^^^^^^^^^ initialised here
-help: move the declaration `x` here
-   |
-LL ~     
-LL |     // types that should be considered insignificant
-LL |     // types that should be considered insignificant
-...
-LL |     let y = Box::new(4);
-LL ~     let x = SignificantDrop;
-
-error: unneeded late initialization
-  --> tests/ui/needless_late_init.rs:115:5
-   |
-   |
-LL |     let a;
-   |     ^^^^^^
-   |
-help: move the declaration `a` here and remove the assignments from the `match` arms
-   |
-LL ~     
-LL |     let n = 1;
-LL ~     let a = match n {
-LL ~         1 => f().await,
-LL |         _ => {
-LL ~             "two"
-LL ~     };
-   |
-
-error: unneeded late initialization
---
-help: move the declaration `a` here and remove the assignments from the `match` arms
-   |
-LL ~     
-LL |     let n = 1;
-LL ~     let a = match n {
-LL ~         1 => f(),
-LL |         _ => {
-LL ~             "two"
-LL ~     };
-   |
-
-error: aborting due to 16 previous errors
-error: aborting due to 16 previous errors
-



FAILED TEST: tests/ui/needless_option_take.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/needless_option_take.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/needless_option_take.stderr` to the actual output
--- tests/ui/needless_option_take.stderr
-error: called `Option::take()` on a temporary value
-  --> tests/ui/needless_option_take.rs:12:5
-   |
-LL |     x.as_ref().take();
-LL |     x.as_ref().take();
-   |     ^^^^^^^^^^^^^^^^^ help: try: `x.as_ref()`
-   = note: `-D clippy::needless-option-take` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::needless_option_take)]`
-
-error: aborting due to 1 previous error
---
-error: aborting due to 2 previous errors
-


error: `unneeded `return` statement with `?` operator` not found in diagnostics on line 69
   |
70 |         //~^ ERROR: unneeded `return` statement with `?` operator
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
---
-LL | |
-LL | |             // never loops
-LL | |             if x == 5 {
-...  |
-LL | |             continue 'outer;
-   | |_________^
-
-error: this loop never actually loops
-  --> tests/ui/never_loop.rs:110:5
-  --> tests/ui/never_loop.rs:110:5
-   |
-LL | /     while let Some(y) = x {
-LL | |         // never loops
-LL | |         return;
-LL | |     }
-   | |_____^
---
-   | |_____^
-   |
-help: if you need the first element of the iterator, try writing
-   |
-LL |     if let Some(x) = (0..10).next() {
-
-error: this loop never actually loops
-  --> tests/ui/never_loop.rs:167:5
-   |
-   |
-LL | /     'outer: while a {
-LL | |         // never loops
-LL | |         while a {
-...  |
-...  |
-LL | |         break 'outer;
-   | |_____^
-
-error: this loop never actually loops
-  --> tests/ui/never_loop.rs:183:9
-  --> tests/ui/never_loop.rs:183:9
-   |
-LL | /         while false {
-LL | |
-LL | |             break 'label;
-   | |_________^
-
-error: this loop never actually loops
-  --> tests/ui/never_loop.rs:235:13
-  --> tests/ui/never_loop.rs:235:13
-   |
-LL |       let _ = loop {
-   |  _____________^
-LL | |
-LL | |         let Some(x) = x else {
-...  |
-LL | |         break x;
-LL | |     };
-   | |_____^
-   | |_____^
-
-error: this loop never actually loops
-  --> tests/ui/never_loop.rs:257:5
-   |
-LL | /     'a: loop {
-LL | |         'b: {
-LL | |         'b: {
-LL | |             break 'b 'c: {
-LL | |         }
-LL | |     }
-   | |_____^
-
---
-   | |_____________^
-   |
-help: if you need the first element of the iterator, try writing
-   |
-LL |             if let Some(_) = (0..20).next() {
-
-error: this loop never actually loops
-  --> tests/ui/never_loop.rs:378:13
-   |
-   |
-LL | /             'c: loop {
-LL | |
-LL | |                 if b { break 'c } else { break 'b }
-   | |_____________^
-
-error: this loop never actually loops
-  --> tests/ui/never_loop.rs:389:5
-  --> tests/ui/never_loop.rs:389:5
-   |
-LL | /     loop {
-LL | |
-LL | |         panic!("oh no");
-   | |_____^
-
-error: this loop never actually loops
-  --> tests/ui/never_loop.rs:393:5
---
13 |         //~^ ERROR: this loop never actually loops
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |

error: ``#[deny(clippy::never_loop)]` on by default` not found in diagnostics on line 12
   |
   |
14 |         //~| NOTE: `#[deny(clippy::never_loop)]` on by default
   |

error: `this loop never actually loops` not found in diagnostics on line 36
##[error]  --> tests/ui/never_loop.rs:37:21
---
258 |         //~^ ERROR: this loop never actually loops
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
    |

error: `sub-expression diverges` not found in diagnostics on line 261
    |
262 |                 //~^ ERROR: sub-expression diverges
    |                             ^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
    |
    |

error: ``-D clippy::diverging-sub-expression` implied by `-D warnings`` not found in diagnostics on line 261
    |
    |
263 |                 //~| NOTE: `-D clippy::diverging-sub-expression` implied by `-D warnings`
    |

error: `this loop never actually loops` not found in diagnostics on line 294
##[error]   --> tests/ui/never_loop.rs:295:29
---
    |


FAILED TEST: tests/ui/no_effect_return.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--crate-type=lib" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/no_effect_return.rs" "--edition" "2021"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/no_effect_return.stderr` to the actual output
--- tests/ui/no_effect_return.stderr
-error: statement with no effect
-  --> tests/ui/no_effect_return.rs:9:9
-   |
-LL |         0u32;
-LL |         0u32;
-   |         -^^^^
-   |         |
-   |         help: did you mean to return it?: `return`
-   = note: `-D clippy::no-effect` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::no_effect)]`
-
-error: statement with no effect
-error: statement with no effect
-  --> tests/ui/no_effect_return.rs:18:9
-   |
-LL |         0u32;
-   |         -^^^^
-   |         |
-   |         help: did you mean to return it?: `return`
-error: statement with no effect
-  --> tests/ui/no_effect_return.rs:27:9
-   |
-LL |         0i32 as C;
-LL |         0i32 as C;
-   |         -^^^^^^^^^
-   |         |
-   |         help: did you mean to return it?: `return`
-error: statement with no effect
-  --> tests/ui/no_effect_return.rs:36:9
-   |
-LL |         0u128;
---
-   |
-LL |         [1u16];
-   |         -^^^^^^
-   |         |
-   |         help: did you mean to return it?: `return`
-error: statement with no effect
-  --> tests/ui/no_effect_return.rs:62:9
-   |
-   |
-LL |         ControlFlow::Break::<()>(());
-   |         |
-   |         |
-   |         help: did you mean to return it?: `return`
-error: statement with no effect
-  --> tests/ui/no_effect_return.rs:80:9
-   |
-LL |         ();
---
10 |         //~^ ERROR: statement with no effect
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |

error: ``-D clippy::no-effect` implied by `-D warnings`` not found in diagnostics on line 9
   |
   |
11 |         //~| NOTE: `-D clippy::no-effect` implied by `-D warnings`
   |

error: `statement with no effect` not found in diagnostics on line 18
##[error]  --> tests/ui/no_effect_return.rs:19:21
---
   |


FAILED TEST: tests/ui/non_canonical_partial_ord_impl_fully_qual.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--crate-type=lib" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/non_canonical_partial_ord_impl_fully_qual.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/non_canonical_partial_ord_impl_fully_qual.stderr` to the actual output
--- tests/ui/non_canonical_partial_ord_impl_fully_qual.stderr
+++ <stderr output>
+++ <stderr output>
-error: non-canonical implementation of `partial_cmp` on an `Ord` type
-  --> tests/ui/non_canonical_partial_ord_impl_fully_qual.rs:23:1
-   |
-LL | /  impl PartialOrd for A {
-LL | |      fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
-   | | _____________________________________________________________-
-LL | ||         // NOTE: This suggestion is wrong, as `Ord` is not in scope. But this should be fine as it isn't
-LL | ||         // automatically applied
-LL | ||         todo!();
-LL | ||     }
-   | ||_____- help: change this to: `{ Some(self.cmp(other)) }`
-   | |__^
-   |
-   = note: `-D clippy::non-canonical-partial-ord-impl` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::non_canonical_partial_ord_impl)]`
-   = help: to override `-D warnings` add `#[allow(clippy::non_canonical_partial_ord_impl)]`
-
-error: non-canonical implementation of `partial_cmp` on an `Ord` type
-  --> tests/ui/non_canonical_partial_ord_impl_fully_qual.rs:46:1
-   |
-LL | /  impl PartialOrd for B {
-LL | |      fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
-   | | _____________________________________________________________-
-LL | ||         // This calls `B.cmp`, not `Ord::cmp`!
-LL | ||         Some(self.cmp(other))
-LL | ||     }
-   | ||_____- help: change this to: `{ Some(std::cmp::Ord::cmp(self, other)) }`
-   | |__^
-
-error: aborting due to 2 previous errors
-
-



FAILED TEST: tests/ui/non_canonical_clone_impl.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--crate-type=lib" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/non_canonical_clone_impl.rs" "--extern" "proc_macro_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/auxiliary/libproc_macro_derive.so" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/auxiliary" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/non_canonical_clone_impl.stderr` to the actual output
--- tests/ui/non_canonical_clone_impl.stderr
+++ <stderr output>
+++ <stderr output>
-error: non-canonical implementation of `clone` on a `Copy` type
-  --> tests/ui/non_canonical_clone_impl.rs:14:29
-   |
-LL |       fn clone(&self) -> Self {
-   |  _____________________________^
-LL | |         Self(self.0)
-LL | |     }
-   | |_____^ help: change this to: `{ *self }`
-   = note: `-D clippy::non-canonical-clone-impl` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::non_canonical_clone_impl)]`
-
-error: unnecessary implementation of `clone_from` on a `Copy` type
---
-LL |       fn clone(&self) -> Self {
-   |  _____________________________^
-LL | |         Self(self.0)
-LL | |     }
-   | |_____^ help: change this to: `{ *self }`
-error: unnecessary implementation of `clone_from` on a `Copy` type
-  --> tests/ui/non_canonical_clone_impl.rs:89:5
-   |
-LL | /     fn clone_from(&mut self, source: &Self) {
---



FAILED TEST: tests/ui/non_canonical_partial_ord_impl.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--crate-type=lib" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/non_canonical_partial_ord_impl.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/non_canonical_partial_ord_impl.stderr` to the actual output
--- tests/ui/non_canonical_partial_ord_impl.stderr
+++ <stderr output>
+++ <stderr output>
-error: non-canonical implementation of `partial_cmp` on an `Ord` type
-  --> tests/ui/non_canonical_partial_ord_impl.rs:16:1
-   |
-LL | /  impl PartialOrd for A {
-LL | |      fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
-   | | _____________________________________________________________-
-LL | ||         todo!();
-LL | ||     }
-   | ||_____- help: change this to: `{ Some(self.cmp(other)) }`
-   | |__^
-   |
-   = note: `-D clippy::non-canonical-partial-ord-impl` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::non_canonical_partial_ord_impl)]`
-   = help: to override `-D warnings` add `#[allow(clippy::non_canonical_partial_ord_impl)]`
-
-error: non-canonical implementation of `partial_cmp` on an `Ord` type
-  --> tests/ui/non_canonical_partial_ord_impl.rs:50:1
-   |
-LL | / impl PartialOrd for C {
-LL | |     fn partial_cmp(&self, _: &Self) -> Option<Ordering> {
-LL | |         todo!();
-LL | | }
-   | |_^
-   |
-help: change this to
-help: change this to
-   |
-LL |     fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.cmp(other)) }
-
-error: aborting due to 2 previous errors
-

---
 
-error: this comparison might be written more concisely
-  --> tests/ui/nonminimal_bool.rs:168:8
-   |
-LL |     if !b == true {}
-   |        ^^^^^^^^^^ help: try simplifying it as shown: `b != true`
-   = note: `-D clippy::bool-comparison` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::bool_comparison)]`
-
-error: equality checks against true are unnecessary
-error: equality checks against true are unnecessary
-  --> tests/ui/nonminimal_bool.rs:168:8
-   |
-LL |     if !b == true {}
-   |        ^^^^^^^^^^ help: try simplifying it as shown: `!b`
 error: this boolean expression can be simplified
   --> tests/ui/nonminimal_bool.rs:169:8
... 2 lines skipped ...
    |        ^^^^^^^^^^ help: try: `b == true`
    |        ^^^^^^^^^^ help: try: `b == true`
 
-error: inequality checks against true can be replaced by a negation
-  --> tests/ui/nonminimal_bool.rs:169:8
-   |
-LL |     if !b != true {}
-   |        ^^^^^^^^^^ help: try simplifying it as shown: `!(!b)`
 error: this boolean expression can be simplified
   --> tests/ui/nonminimal_bool.rs:170:8
... 2 lines skipped ...
    |        ^^^^^^^^^^ help: try: `true != b`
    |        ^^^^^^^^^^ help: try: `true != b`
 
-error: this comparison might be written more concisely
-  --> tests/ui/nonminimal_bool.rs:170:8
-   |
-LL |     if true == !b {}
-   |        ^^^^^^^^^^ help: try simplifying it as shown: `true != b`
-error: equality checks against true are unnecessary
-  --> tests/ui/nonminimal_bool.rs:170:8
-   |
-   |
-LL |     if true == !b {}
-   |        ^^^^^^^^^^ help: try simplifying it as shown: `!b`
 error: this boolean expression can be simplified
   --> tests/ui/nonminimal_bool.rs:171:8
... 2 lines skipped ...
    |        ^^^^^^^^^^ help: try: `true == b`
    |        ^^^^^^^^^^ help: try: `true == b`
 
-error: inequality checks against true can be replaced by a negation
-  --> tests/ui/nonminimal_bool.rs:171:8
-   |
-LL |     if true != !b {}
-   |        ^^^^^^^^^^ help: try simplifying it as shown: `!(!b)`
 error: this boolean expression can be simplified
   --> tests/ui/nonminimal_bool.rs:172:8
... 8 lines skipped ...
    |        ^^^^^^^^ help: try: `b != c`
---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/ok_expect.stderr` to the actual output
--- tests/ui/ok_expect.stderr
+++ <stderr output>
-error: called `ok().expect()` on a `Result` value
-   |
-   |
-LL |     res.ok().expect("disaster!");
-   |
-   = help: you can call `expect()` directly on the `Result`
-   = note: `-D clippy::ok-expect` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::ok_expect)]`
-   = help: to override `-D warnings` add `#[allow(clippy::ok_expect)]`
-
-error: called `ok().expect()` on a `Result` value
-   |
-   |
-LL |     res3.ok().expect("whoof");
-   |
-   = help: you can call `expect()` directly on the `Result`
-
-
-error: called `ok().expect()` on a `Result` value
-   |
-   |
-LL |     res4.ok().expect("argh");
-   |
-   = help: you can call `expect()` directly on the `Result`
-
-
-error: called `ok().expect()` on a `Result` value
-   |
-   |
-LL |     res5.ok().expect("oops");
-   |
-   = help: you can call `expect()` directly on the `Result`
-
-
-error: called `ok().expect()` on a `Result` value
-   |
-   |
-LL |     res6.ok().expect("meh");
-   |
-   = help: you can call `expect()` directly on the `Result`
-
-error: aborting due to 5 previous errors
-error: aborting due to 5 previous errors
-


error: `called `ok().expect()` on a `Result` value` not found in diagnostics on line 16
   |
   |
17 |     //~^ ERROR: called `ok().expect()` on a `Result` value
   |


error: `called `ok().expect()` on a `Result` value` not found in diagnostics on line 23
   |
   |
24 |     //~^ ERROR: called `ok().expect()` on a `Result` value
   |


error: `called `ok().expect()` on a `Result` value` not found in diagnostics on line 26
   |
   |
27 |     //~^ ERROR: called `ok().expect()` on a `Result` value
   |


error: `called `ok().expect()` on a `Result` value` not found in diagnostics on line 29
   |
   |
30 |     //~^ ERROR: called `ok().expect()` on a `Result` value
   |


error: `called `ok().expect()` on a `Result` value` not found in diagnostics on line 32
   |
   |
33 |     //~^ ERROR: called `ok().expect()` on a `Result` value
   |


FAILED TEST: tests/ui/option_map_or_none.rs
FAILED TEST: tests/ui/option_map_or_none.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/option_map_or_none.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/option_map_or_none.stderr` to the actual output
--- tests/ui/option_map_or_none.stderr
+++ <stderr output>
-error: called `map_or(None, ..)` on an `Option` value
-   |
-   |
-LL |     let _: Option<i32> = opt.map_or(None, |x| Some(x + 1));
-   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `map`: `opt.map(|x| x + 1)`
-   = note: `-D clippy::option-map-or-none` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::option_map_or_none)]`
-
-
-error: called `map_or(None, ..)` on an `Option` value
-   |
-   |
-LL |       let _: Option<i32> = opt.map_or(None, |x| {
-LL | |                         Some(x + 1)
-LL | |                        });
-LL | |                        });
-   | |_________________________^ help: consider using `map`: `opt.map(|x| x + 1)`
-
-error: called `map_or(None, ..)` on an `Option` value
-   |
-   |
-LL |     let _: Option<i32> = opt.map_or(None, bar);
-   |                          ^^^^^^^^^^^^^^^^^^^^^ help: consider using `and_then`: `opt.and_then(bar)`
-
-error: called `map_or(None, ..)` on an `Option` value
-   |
-   |
-LL |       let _: Option<i32> = opt.map_or(None, |x| {
-LL | |         let offset = 0;
-LL | |         let height = x;
-LL | |         let height = x;
-LL | |         Some(offset + height)
-   | |______^
-   |
-help: consider using `and_then`
-   |
-   |
-LL ~     let _: Option<i32> = opt.and_then(|x| {
-LL +         let offset = 0;
-LL +         let height = x;
-LL +         Some(offset + height)
-LL ~     });
-
-
-error: called `map_or(None, Some)` on a `Result` value
-   |
-   |
-LL |     let _: Option<i32> = r.map_or(None, Some);
-   |                          ^^^^^^^^^^^^^^^^^^^^ help: consider using `ok`: `r.ok()`
-   = note: `-D clippy::result-map-or-into-option` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::result_map_or_into_option)]`
-
-error: aborting due to 5 previous errors
---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/partialeq_ne_impl.stderr` to the actual output
--- tests/ui/partialeq_ne_impl.stderr
+++ <stderr output>
-error: re-implementing `PartialEq::ne` is unnecessary
-   |
-   |
-LL | /     fn ne(&self, _: &Foo) -> bool {
-LL | |
-LL | |         false
-LL | |     }
-   | |_____^
-   | |_____^
-   |
-   = note: `-D clippy::partialeq-ne-impl` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::partialeq_ne_impl)]`
-error: aborting due to 1 previous error
-



error: `re-implementing `PartialEq::ne` is unnecessary` not found in diagnostics on line 9
   |
   |
10 |         //~^ ERROR: re-implementing `PartialEq::ne` is unnecessary
   |


error: ``-D clippy::partialeq-ne-impl` implied by `-D warnings`` not found in diagnostics on line 9
   |
   |
11 |         //~| NOTE: `-D clippy::partialeq-ne-impl` implied by `-D warnings`
   |


FAILED TEST: tests/ui/println_empty_string.rs
---
-
-error: empty string literal in `eprintln!`
-  --> tests/ui/println_empty_string.rs:15:14
-   |
-LL |         _ => eprintln!(""),
-   |              ^^^^^^^^^^--^
-   |                        help: remove the empty string
-
-error: aborting due to 4 previous errors
-
-



FAILED TEST: tests/ui/proc_macro.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--crate-type=proc-macro" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/proc_macro.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/proc_macro.stderr` to the actual output
--- tests/ui/proc_macro.stderr
+++ <stderr output>
+++ <stderr output>
-error: approximate value of `f{32, 64}::consts::PI` found
-   |
-LL |     let _x = 3.14;
-   |              ^^^^
-   |
-   |
-   = help: consider using the constant directly
-   = note: `#[deny(clippy::approx_constant)]` on by default
-
-error: aborting due to 1 previous error
-


error: `approximate value of `f{32, 64}::consts::PI` found` not found in diagnostics on line 9
   |
   |
10 |     //~^ ERROR: approximate value of `f{32, 64}::consts::PI` found
   |


FAILED TEST: tests/ui/ptr_offset_with_cast.rs
---
+++ <stderr output>
-error: use of `offset` with a `usize` casted to an `isize`
-  --> tests/ui/ptr_offset_with_cast.rs:12:17
-   |
-LL |         let _ = ptr.offset(offset_usize as isize);
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.add(offset_usize)`
-   = note: `-D clippy::ptr-offset-with-cast` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::ptr_offset_with_cast)]`
-
-error: use of `wrapping_offset` with a `usize` casted to an `isize`
-error: use of `wrapping_offset` with a `usize` casted to an `isize`
-  --> tests/ui/ptr_offset_with_cast.rs:16:17
-   |
-LL |         let _ = ptr.wrapping_offset(offset_usize as isize);
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.wrapping_add(offset_usize)`
-error: aborting due to 2 previous errors
-


---
-   |
-LL | /     if a.is_none() {
-LL | |         return None;
-LL | |     }
-   | |_____^ help: replace it with: `a?;`
-   = note: `-D clippy::question-mark` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::question_mark)]`
-
-error: this block may be rewritten with the `?` operator
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:52:9
-   |
-LL | /         if (self.opt).is_none() {
-LL | |             return None;
-LL | |         }
-   | |_________^ help: replace it with: `(self.opt)?;`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:56:9
-   |
-LL | /         if self.opt.is_none() {
-LL | /         if self.opt.is_none() {
-LL | |             return None
-LL | |         }
-   | |_________^ help: replace it with: `self.opt?;`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:60:17
-   |
-LL |           let _ = if self.opt.is_none() {
-LL |           let _ = if self.opt.is_none() {
-   |  _________________^
-LL | |             return None;
-LL | |         } else {
-LL | |             self.opt
-LL | |         };
-   | |_________^ help: replace it with: `Some(self.opt?)`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:66:17
-   |
-LL |           let _ = if let Some(x) = self.opt {
-LL |           let _ = if let Some(x) = self.opt {
-   |  _________________^
-LL | |             x
-LL | |         } else {
-LL | |             return None;
-LL | |         };
-   | |_________^ help: replace it with: `self.opt?`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:83:9
-   |
-LL | /         if self.opt.is_none() {
-LL | /         if self.opt.is_none() {
-LL | |             return None;
-LL | |         }
-   | |_________^ help: replace it with: `self.opt.as_ref()?;`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:91:9
-   |
-LL | /         if self.opt.is_none() {
-LL | /         if self.opt.is_none() {
-LL | |             return None;
-LL | |         }
-   | |_________^ help: replace it with: `self.opt.as_ref()?;`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:99:9
-   |
-LL | /         if self.opt.is_none() {
-LL | /         if self.opt.is_none() {
-LL | |             return None;
-LL | |         }
-   | |_________^ help: replace it with: `self.opt.as_ref()?;`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:106:26
-   |
-   |
-LL |           let v: &Vec<_> = if let Some(ref v) = self.opt {
-LL | |             v
-LL | |         } else {
-LL | |             return None;
-LL | |         };
-LL | |         };
-   | |_________^ help: replace it with: `self.opt.as_ref()?`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:116:17
-   |
-LL |           let v = if let Some(v) = self.opt {
-LL |           let v = if let Some(v) = self.opt {
-   |  _________________^
-LL | |             v
-LL | |         } else {
-LL | |             return None;
-LL | |         };
-   | |_________^ help: replace it with: `self.opt?`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:137:5
-   |
-   |
-LL | /     if f().is_none() {
-LL | |     }
-LL | |     }
-   | |_____^ help: replace it with: `f()?;`
-error: this `match` expression can be replaced with `?`
-  --> tests/ui/question_mark.rs:141:16
-   |
-LL |       let _val = match f() {
-LL |       let _val = match f() {
-   |  ________________^
-LL | |         Some(val) => val,
-LL | |         None => return None,
-LL | |     };
-   | |_____^ help: try instead: `f()?`
-error: this `match` expression can be replaced with `?`
-  --> tests/ui/question_mark.rs:151:5
-   |
-LL | /     match f() {
-LL | /     match f() {
-LL | |         Some(val) => val,
-LL | |         None => return None,
-LL | |     };
-   | |_____^ help: try instead: `f()?`
-error: this `match` expression can be replaced with `?`
-  --> tests/ui/question_mark.rs:156:5
-   |
-   |
-LL | /     match opt_none!() {
-LL | |         Some(x) => x,
-LL | |     };
-LL | |     };
-   | |_____^ help: try instead: `opt_none!()?`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:182:13
-   |
-   |
-LL |     let _ = if let Ok(x) = x { x } else { return x };
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x?`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:184:5
-   |
-   |
-LL | /     if x.is_err() {
-LL | |         return x;
-LL | |     }
-   | |_____^ help: replace it with: `x?;`
-error: this `match` expression can be replaced with `?`
-  --> tests/ui/question_mark.rs:188:16
-   |
-LL |       let _val = match func_returning_result() {
-LL |       let _val = match func_returning_result() {
-   |  ________________^
-LL | |         Ok(val) => val,
-LL | |         Err(err) => return Err(err),
-LL | |     };
-   | |_____^ help: try instead: `func_returning_result()?`
-error: this `match` expression can be replaced with `?`
-  --> tests/ui/question_mark.rs:193:5
-   |
-LL | /     match func_returning_result() {
-LL | /     match func_returning_result() {
-LL | |         Ok(val) => val,
-LL | |         Err(err) => return Err(err),
-LL | |     };
-   | |_____^ help: try instead: `func_returning_result()?`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:284:5
-   |
-LL | /     if let Err(err) = func_returning_result() {
-LL | /     if let Err(err) = func_returning_result() {
-LL | |         return Err(err);
-LL | |     }
-   | |_____^ help: replace it with: `func_returning_result()?;`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:291:5
-   |
-LL | /     if let Err(err) = func_returning_result() {
-LL | /     if let Err(err) = func_returning_result() {
-LL | |         return Err(err);
-LL | |     }
-   | |_____^ help: replace it with: `func_returning_result()?;`
-error: this block may be rewritten with the `?` operator
-  --> tests/ui/question_mark.rs:368:13
-   |
-LL | /             if a.is_none() {
-LL | /             if a.is_none() {
-LL | |                 return None;
-LL | |                 // do lint here, the outer `try` is not relevant here
-LL | |                 // https://github.com/rust-lang/rust-clippy/pull/11001#issuecomment-1610636867
-LL | |             }
-   | |_____________^ help: replace it with: `a?;`
-
-error: this `let...else` may be rewritten with the `?` operator
-   |
-   |
-LL | /     let Some(v) = bar.foo.owned.clone() else {
-LL | |     };
-LL | |     };
-   | |______^ help: replace it with: `let v = bar.foo.owned.clone()?;`
-error: aborting due to 22 previous errors
-


---
+++ <stderr output>
-error: you should use the `starts_with` method
-  --> tests/ui/starts_ends_with.rs:7:5
-   |
-LL |     "".chars().next() == Some(' ');
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with(' ')`
-   |
-   = note: `-D clippy::chars-next-cmp` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::chars_next_cmp)]`
-error: you should use the `starts_with` method
-  --> tests/ui/starts_ends_with.rs:8:5
-   |
-   |
-LL |     Some(' ') != "".chars().next();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')`
-error: you should use the `starts_with` method
-  --> tests/ui/starts_ends_with.rs:11:5
-   |
-   |
-LL |     "".chars().next() == Some('\n');
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with('\n')`
-error: you should use the `starts_with` method
-  --> tests/ui/starts_ends_with.rs:12:5
-   |
-   |
-LL |     Some('\n') != "".chars().next();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with('\n')`
-error: you should use the `starts_with` method
-  --> tests/ui/starts_ends_with.rs:17:8
-   |
-   |
-LL |     if s.chars().next().unwrap() == 'f' {
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('f')`
-
-error: you should use the `ends_with` method
-   |
-   |
-LL |     if s.chars().next_back().unwrap() == 'o' {
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
-   = note: `-D clippy::chars-last-cmp` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::chars_last_cmp)]`
-
-
-error: you should use the `ends_with` method
-   |
-   |
-LL |     if s.chars().last().unwrap() == 'o' {
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
-error: you should use the `starts_with` method
-  --> tests/ui/starts_ends_with.rs:29:8
-   |
-   |
-LL |     if s.chars().next().unwrap() != 'f' {
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('f')`
-
-error: you should use the `ends_with` method
-   |
-   |
-LL |     if s.chars().next_back().unwrap() != 'o' {
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
-
-error: you should use the `ends_with` method
-   |
-   |
-LL |     if s.chars().last().unwrap() != '\n' {
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('\n')`
-
-error: you should use the `ends_with` method
-   |
-   |
-LL |     "".chars().last() == Some(' ');
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
-
-error: you should use the `ends_with` method
-   |
-   |
-LL |     Some(' ') != "".chars().last();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
-
-error: you should use the `ends_with` method
-   |
-   |
-LL |     "".chars().next_back() == Some(' ');
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
-
-error: you should use the `ends_with` method
-   |
-   |
-LL |     Some(' ') != "".chars().next_back();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
-
-error: you should use the `ends_with` method
-   |
-   |
-LL |     "".chars().last() == Some('\n');
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with('\n')`
-
-error: you should use the `ends_with` method
-   |
-   |
-LL |     Some('\n') != "".chars().last();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with('\n')`
-error: aborting due to 16 previous errors
-


---
+++ <stderr output>
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:14:5
-   |
-LL |     let mut vec1 = Vec::with_capacity(len);
-   |                    ----------------------- help: consider replacing this with: `vec![0; len]`
-LL |     vec1.extend(repeat(0).take(len));
-   |
-   = note: `-D clippy::slow-vector-initialization` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::slow_vector_initialization)]`
-
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:20:5
-   |
-LL |     let mut vec2 = Vec::with_capacity(len - 10);
-   |                    ---------------------------- help: consider replacing this with: `vec![0; len - 10]`
-LL |     vec2.extend(repeat(0).take(len - 10));
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:28:5
-   |
-   |
-LL |     let mut vec4 = Vec::with_capacity(len);
-   |                    ----------------------- help: consider replacing this with: `vec![0; len]`
-LL |     vec4.extend(repeat(0).take(vec4.capacity()));
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:39:5
-   |
-   |
-LL |     let mut resized_vec = Vec::with_capacity(30);
-   |                           ---------------------- help: consider replacing this with: `vec![0; 30]`
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:43:5
-  --> tests/ui/slow_vector_initialization.rs:43:5
-   |
-LL |     let mut extend_vec = Vec::with_capacity(30);
-   |                          ---------------------- help: consider replacing this with: `vec![0; 30]`
-LL |     extend_vec.extend(repeat(0).take(30));
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:51:5
-   |
-   |
-LL |     let mut vec1 = Vec::with_capacity(len);
-   |                    ----------------------- help: consider replacing this with: `vec![0; len]`
-LL |     vec1.resize(len, 0);
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:60:5
-   |
-   |
-LL |     let mut vec3 = Vec::with_capacity(len - 10);
-   |                    ---------------------------- help: consider replacing this with: `vec![0; len - 10]`
-LL |     vec3.resize(len - 10, 0);
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:64:5
-   |
-   |
-LL |     let mut vec4 = Vec::with_capacity(len);
-   |                    ----------------------- help: consider replacing this with: `vec![0; len]`
-LL |     vec4.resize(vec4.capacity(), 0);
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:69:5
-   |
-   |
-LL |     vec1 = Vec::with_capacity(10);
-   |            ---------------------- help: consider replacing this with: `vec![0; 10]`
-   |     ^^^^^^^^^^^^^^^^^^
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:77:5
-  --> tests/ui/slow_vector_initialization.rs:77:5
-   |
-LL |     let mut vec1 = Vec::new();
-   |                    ---------- help: consider replacing this with: `vec![0; len]`
-LL |     vec1.resize(len, 0);
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:82:5
-   |
-   |
-LL |     let mut vec3 = Vec::new();
-   |                    ---------- help: consider replacing this with: `vec![0; len - 10]`
-LL |     vec3.resize(len - 10, 0);
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:87:5
-   |
-   |
-LL |     vec1 = Vec::new();
-   |            ---------- help: consider replacing this with: `vec![0; 10]`
-   |     ^^^^^^^^^^^^^^^^^^
-
-error: slow zero-filling initialization
-  --> tests/ui/slow_vector_initialization.rs:91:5
-  --> tests/ui/slow_vector_initialization.rs:91:5
-   |
-LL |     vec1 = vec![];
-   |            ------ help: consider replacing this with: `vec![0; 10]`
-   |     ^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 13 previous errors
-
---
15 |     //~^ ERROR: slow zero-filling initialization
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |

error: ``-D clippy::slow-vector-initialization` implied by `-D warnings`` not found in diagnostics on line 14
   |
   |
16 |     //~| NOTE: `-D clippy::slow-vector-initialization` implied by `-D warnings`
   |

error: `slow zero-filling initialization` not found in diagnostics on line 20
##[error]  --> tests/ui/slow_vector_initialization.rs:21:17
---
+++ <stderr output>
-error: manual implementation of an assign operation
-  --> tests/ui/string_add.rs:13:9
-   |
-LL |         x = x + ".";
-   |         ^^^^^^^^^^^ help: replace it with: `x += "."`
-   = note: `-D clippy::assign-op-pattern` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::assign_op_pattern)]`
-
-
 error: you added something to a string. Consider using `String::push_str()` instead
... 11 lines skipped ...
    |             ^^^^^^^^^
 
-error: manual implementation of an assign operation
---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/string_add_assign.stderr` to the actual output
--- tests/ui/string_add_assign.stderr
+++ <stderr output>
 error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
... 5 lines skipped ...
    = help: to override `-D warnings` add `#[allow(clippy::string_add_assign)]`
 
-error: manual implementation of an assign operation
---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/string_extend.stderr` to the actual output
--- tests/ui/string_extend.stderr
+++ <stderr output>
-error: calling `.extend(_.chars())`
-   |
-   |
-LL |     s.extend(abc.chars());
-   |     ^^^^^^^^^^^^^^^^^^^^^ help: try: `s.push_str(abc)`
-   = note: `-D clippy::string-extend-chars` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::string_extend_chars)]`
-
-
-error: calling `.extend(_.chars())`
-   |
-   |
-LL |     s.extend("abc".chars());
-   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.push_str("abc")`
-
-error: calling `.extend(_.chars())`
-   |
-   |
-LL |     s.extend(def.chars());
-   |     ^^^^^^^^^^^^^^^^^^^^^ help: try: `s.push_str(&def)`
-
-error: calling `.extend(_.chars())`
-   |
-   |
-LL |     s.extend(abc[0..2].chars());
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.push_str(&abc[0..2])`
-error: aborting due to 4 previous errors
-


---
+++ <stderr output>
-error: single argument that looks like it should be multiple arguments
-  --> tests/ui/suspicious_command_arg_space.rs:4:44
-   |
-LL |     std::process::Command::new("echo").arg("-n hello").spawn().unwrap();
-   |
-   = note: `-D clippy::suspicious-command-arg-space` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::suspicious_command_arg_space)]`
-help: consider splitting the argument
-help: consider splitting the argument
-   |
-LL |     std::process::Command::new("echo").args(["-n", "hello"]).spawn().unwrap();
-
-error: single argument that looks like it should be multiple arguments
-  --> tests/ui/suspicious_command_arg_space.rs:7:43
-   |
-   |
-LL |     std::process::Command::new("cat").arg("--number file").spawn().unwrap();
-   |
-help: consider splitting the argument
-   |
-   |
-LL |     std::process::Command::new("cat").args(["--number", "file"]).spawn().unwrap();
-
-error: aborting due to 2 previous errors
-

---
5 |     //~^ ERROR: single argument that looks like it should be multiple arguments
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
  |

error: ``-D clippy::suspicious-command-arg-space` implied by `-D warnings`` not found in diagnostics on line 4
  |
  |
6 |     //~| NOTE: `-D clippy::suspicious-command-arg-space` implied by `-D warnings`
  |

error: `single argument that looks like it should be multiple arguments` not found in diagnostics on line 7
##[error] --> tests/ui/suspicious_command_arg_space.rs:8:17
---
-  --> tests/ui/test_attr_in_doctest.rs:16:5
-   |
-LL |   /// #[test]
-   |  _____^
-LL | | /// fn should_also_be_linted() {
-
-error: unit tests in doctest are not executed
-  --> tests/ui/test_attr_in_doctest.rs:22:5
-   |
---
-
-error: this call for this type may be undefined behavior
-  --> tests/ui/uninit.rs:44:29
-   |
-LL |         let _: T = unsafe { MaybeUninit::uninit().assume_init() };
-
-error: aborting due to 3 previous errors
-

---
13 |     //~^ ERROR: this call for this type may be undefined behavior
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |

error: ``#[deny(clippy::uninit_assumed_init)]` on by default` not found in diagnostics on line 12
   |
   |
14 |     //~| NOTE: `#[deny(clippy::uninit_assumed_init)]` on by default
   |

error: `this call for this type may be undefined behavior` not found in diagnostics on line 35
##[error]  --> tests/ui/uninit.rs:36:17
---
 
-error: equal expressions as operands to `!=`
-  --> tests/ui/unconditional_recursion.rs:111:9
-   |
-LL |         other != other
-   |
-   |
-   = note: `#[deny(clippy::eq_op)]` on by default
 error: function cannot return without recursing
   --> tests/ui/unconditional_recursion.rs:113:5
... 11 lines skipped ...
    |         ^^^^^^^^^^^^^^
---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/unnecessary_find_map.stderr` to the actual output
--- tests/ui/unnecessary_find_map.stderr
+++ <stderr output>
-error: this `.find_map` can be written more simply
-   |
-   |
-LL |     let _ = (0..4).find_map(|x| if x > 1 { Some(x) } else { None });
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try instead: `find`
-   = note: `-D clippy::unnecessary-find-map` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::unnecessary_find_map)]`
-
-
-error: this `.find_map` can be written more simply
-   |
-   |
-LL |       let _ = (0..4).find_map(|x| {
-LL | |
-LL | |         if x > 1 {
-LL | |             return Some(x);
-LL | |         };
-LL | |         };
-LL | |         None
-LL | |     });
-   | |______^ help: try instead: `find`
-
-error: this `.find_map` can be written more simply
-   |
-   |
-LL |       let _ = (0..4).find_map(|x| match x {
-LL | |
-LL | |         0 | 1 => None,
-LL | |         0 | 1 => None,
-LL | |         _ => Some(x),
-   | |______^ help: try instead: `find`
-
-
-error: this `.find_map` can be written more simply
-   |
-   |
-LL |     let _ = (0..4).find_map(|x| Some(x + 1));
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try instead: `map(..).next()`
-
-error: this `.find_map` can be written more simply
-   |
-   |
-LL |     let _x = std::iter::once(1).find_map(|n| (n > 1).then_some(n));
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try instead: `find`
-error: aborting due to 5 previous errors
-



error: `this `.find_map` can be written more simply` not found in diagnostics on line 5
  |
  |
6 |     //~^ ERROR: this `.find_map` can be written more simply
  |


error: ``-D clippy::unnecessary-find-map` implied by `-D warnings`` not found in diagnostics on line 5
  |
  |
7 |     //~| NOTE: `-D clippy::unnecessary-find-map` implied by `-D warnings`
  |


error: `this `.find_map` can be written more simply` not found in diagnostics on line 8
  |
  |
9 |         //~^ ERROR: this `.find_map` can be written more simply
  |


error: `this `.find_map` can be written more simply` not found in diagnostics on line 15
   |
   |
16 |         //~^ ERROR: this `.find_map` can be written more simply
   |


error: `this `.find_map` can be written more simply` not found in diagnostics on line 21
   |
   |
22 |     //~^ ERROR: this `.find_map` can be written more simply
   |


FAILED TEST: tests/ui/unnecessary_filter_map.rs
FAILED TEST: tests/ui/unnecessary_filter_map.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/unnecessary_filter_map.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/unnecessary_filter_map.stderr` to the actual output
--- tests/ui/unnecessary_filter_map.stderr
+++ <stderr output>
-error: this `.filter_map` can be written more simply
-   |
-   |
-LL |     let _ = (0..4).filter_map(|x| if x > 1 { Some(x) } else { None });
-   |
-   = note: `-D clippy::unnecessary-filter-map` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::unnecessary_filter_map)]`
-
-
-error: this `.filter_map` can be written more simply
-   |
-   |
-LL |       let _ = (0..4).filter_map(|x| {
-LL | |
-LL | |         if x > 1 {
-LL | |             return Some(x);
-LL | |         };
-LL | |         };
-LL | |         None
-LL | |     });
-   | |______^ help: try instead: `filter`
-
-error: this `.filter_map` can be written more simply
-   |
-   |
-LL |       let _ = (0..4).filter_map(|x| match x {
-LL | |
-LL | |         0 | 1 => None,
-LL | |         0 | 1 => None,
-LL | |         _ => Some(x),
-   | |______^ help: try instead: `filter`
-
-
-error: this `.filter_map` can be written more simply
-   |
-   |
-LL |     let _ = (0..4).filter_map(|x| Some(x + 1));
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try instead: `map`
-error: redundant closure
-  --> tests/ui/unnecessary_filter_map.rs:28:57
-   |
-   |
-LL |     let _ = vec![Some(10), None].into_iter().filter_map(|x| Some(x));
-   |                                                         ^^^^^^^^^^^ help: replace the closure with the function itself: `Some`
-   = note: `-D clippy::redundant-closure` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
-
-error: filter_map is unnecessary
-error: filter_map is unnecessary
-  --> tests/ui/unnecessary_filter_map.rs:28:61
-   |
-LL |     let _ = vec![Some(10), None].into_iter().filter_map(|x| Some(x));
-
-
-error: this `.filter_map` can be written more simply
-   |
-   |
-LL |     let _ = vec![Some(10), None].into_iter().filter_map(|x| Some(x));
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try instead: `map`
-
-error: this `.filter_map` can be written more simply
-   |
-   |
-LL |     let _x = std::iter::once(1).filter_map(|n| (n > 1).then_some(n));
-
-error: aborting due to 8 previous errors
-



error: `this `.filter_map` can be written more simply` not found in diagnostics on line 5
  |
  |
6 |     //~^ ERROR: this `.filter_map` can be written more simply
  |


error: ``-D clippy::unnecessary-filter-map` implied by `-D warnings`` not found in diagnostics on line 5
  |
  |
7 |     //~| NOTE: `-D clippy::unnecessary-filter-map` implied by `-D warnings`
  |


error: `this `.filter_map` can be written more simply` not found in diagnostics on line 8
  |
  |
9 |         //~^ ERROR: this `.filter_map` can be written more simply
  |


error: `this `.filter_map` can be written more simply` not found in diagnostics on line 15
   |
   |
16 |         //~^ ERROR: this `.filter_map` can be written more simply
   |


error: `this `.filter_map` can be written more simply` not found in diagnostics on line 21
   |
   |
22 |     //~^ ERROR: this `.filter_map` can be written more simply
   |


FAILED TEST: tests/ui/unnecessary_fold.rs
FAILED TEST: tests/ui/unnecessary_fold.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/unnecessary_fold.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/unnecessary_fold.stderr` to the actual output
--- tests/ui/unnecessary_fold.stderr
+++ <stderr output>
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |     let _ = (0..3).fold(false, |acc, x| acc || x > 2);
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `any(|x| x > 2)`
-   = note: `-D clippy::unnecessary-fold` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::unnecessary_fold)]`
-
-error: redundant closure
-error: redundant closure
-  --> tests/ui/unnecessary_fold.rs:12:32
-   |
-LL |     let _ = (0..3).fold(false, |acc, x| is_any(acc, x));
-   |                                ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_any`
-   = note: `-D clippy::redundant-closure` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
-
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |     let _ = (0..3).fold(true, |acc, x| acc && x > 2);
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `all(|x| x > 2)`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |     let _: i32 = (0..3).fold(0, |acc, x| acc + x);
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |     let _: i32 = (0..3).fold(1, |acc, x| acc * x);
-   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |     let _: bool = (0..3).map(|x| 2 * x).fold(false, |acc, x| acc || x > 2);
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `any(|x| x > 2)`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |         .fold(false, |acc, x| acc || x > 2);
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `any(|x| x > 2)`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |         assert_eq!(map.values().fold(0, |x, y| x + y), 0);
-   |                                 ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::<i32>()`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |         let _ = map.values().fold(0, |x, y| x + y);
-   |                              ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::<i32>()`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |         let _ = map.values().fold(1, |x, y| x * y);
-   |                              ^^^^^^^^^^^^^^^^^^^^^ help: try: `product::<i32>()`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |         let _: i32 = map.values().fold(0, |x, y| x + y);
-   |                                   ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |         let _: i32 = map.values().fold(1, |x, y| x * y);
-   |                                   ^^^^^^^^^^^^^^^^^^^^^ help: try: `product()`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |         anything(map.values().fold(0, |x, y| x + y));
-   |                               ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::<i32>()`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |         anything(map.values().fold(1, |x, y| x * y));
-   |                               ^^^^^^^^^^^^^^^^^^^^^ help: try: `product::<i32>()`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |         num(map.values().fold(0, |x, y| x + y));
-   |                          ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()`
-
-error: this `.fold` can be written more succinctly using another method
-   |
-   |
-LL |         num(map.values().fold(1, |x, y| x * y));
-   |                          ^^^^^^^^^^^^^^^^^^^^^ help: try: `product()`
-error: aborting due to 16 previous errors
-


---
+++ <stderr output>
-error: unnecessary use of `to_string`
-  --> tests/ui/unnecessary_to_owned_on_split.rs:19:13
-   |
-LL |     let _ = "a".to_string().split('a').next().unwrap();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"a".split('a')`
-   = note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::unnecessary_to_owned)]`
-
-error: unnecessary use of `to_string`
-error: unnecessary use of `to_string`
-  --> tests/ui/unnecessary_to_owned_on_split.rs:21:13
-   |
-LL |     let _ = "a".to_string().split("a").next().unwrap();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"a".split("a")`
-error: unnecessary use of `to_owned`
-  --> tests/ui/unnecessary_to_owned_on_split.rs:23:13
-   |
-   |
-LL |     let _ = "a".to_owned().split('a').next().unwrap();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"a".split('a')`
-error: unnecessary use of `to_owned`
-  --> tests/ui/unnecessary_to_owned_on_split.rs:25:13
-   |
-   |
-LL |     let _ = "a".to_owned().split("a").next().unwrap();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"a".split("a")`
-error: unnecessary use of `to_string`
-  --> tests/ui/unnecessary_to_owned_on_split.rs:27:13
-   |
-   |
-LL |     let _ = Issue12068.to_string().split('a').next().unwrap();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Issue12068.as_ref().split('a')`
-error: unnecessary use of `to_vec`
-  --> tests/ui/unnecessary_to_owned_on_split.rs:30:13
-   |
-   |
-LL |     let _ = [1].to_vec().split(|x| *x == 2).next().unwrap();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[1].split(|x| *x == 2)`
-error: unnecessary use of `to_vec`
-  --> tests/ui/unnecessary_to_owned_on_split.rs:32:13
-   |
-   |
-LL |     let _ = [1].to_vec().split(|x| *x == 2).next().unwrap();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[1].split(|x| *x == 2)`
-error: unnecessary use of `to_owned`
-  --> tests/ui/unnecessary_to_owned_on_split.rs:34:13
-   |
-   |
-LL |     let _ = [1].to_owned().split(|x| *x == 2).next().unwrap();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[1].split(|x| *x == 2)`
-error: unnecessary use of `to_owned`
-  --> tests/ui/unnecessary_to_owned_on_split.rs:36:13
-   |
-   |
-LL |     let _ = [1].to_owned().split(|x| *x == 2).next().unwrap();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[1].split(|x| *x == 2)`
-error: aborting due to 9 previous errors
-



error: `unnecessary use of `to_string`` not found in diagnostics on line 19
   |
20 |     //~^ ERROR: unnecessary use of `to_string`
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
   |

error: `unnecessary use of `to_string`` not found in diagnostics on line 21
   |
22 |     //~^ ERROR: unnecessary use of `to_string`
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
   |

error: `unnecessary use of `to_owned`` not found in diagnostics on line 23
   |
24 |     //~^ ERROR: unnecessary use of `to_owned`
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
   |

error: `unnecessary use of `to_owned`` not found in diagnostics on line 25
   |
26 |     //~^ ERROR: unnecessary use of `to_owned`
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
   |

error: `unnecessary use of `to_string`` not found in diagnostics on line 27
   |
28 |     //~^ ERROR: unnecessary use of `to_string`
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
   |

error: `unnecessary use of `to_vec`` not found in diagnostics on line 30
   |
31 |     //~^ ERROR: unnecessary use of `to_vec`
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
   |

error: `unnecessary use of `to_vec`` not found in diagnostics on line 32
   |
33 |     //~^ ERROR: unnecessary use of `to_vec`
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
   |

error: `unnecessary use of `to_owned`` not found in diagnostics on line 34
   |
35 |     //~^ ERROR: unnecessary use of `to_owned`
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
   |

error: `unnecessary use of `to_owned`` not found in diagnostics on line 36
   |
37 |     //~^ ERROR: unnecessary use of `to_owned`
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |
   |


FAILED TEST: tests/ui/unnecessary_sort_by.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/unnecessary_sort_by.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/unnecessary_sort_by.stderr` to the actual output
--- tests/ui/unnecessary_sort_by.stderr
-error: consider using `sort`
-  --> tests/ui/unnecessary_sort_by.rs:12:5
-   |
-   |
-LL |     vec.sort_by(|a, b| a.cmp(b));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vec.sort()`
-   |
-   = note: `-D clippy::unnecessary-sort-by` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::unnecessary_sort_by)]`
-error: consider using `sort`
-  --> tests/ui/unnecessary_sort_by.rs:13:5
-   |
-   |
-LL |     vec.sort_unstable_by(|a, b| a.cmp(b));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vec.sort_unstable()`
-error: consider using `sort_by_key`
-  --> tests/ui/unnecessary_sort_by.rs:14:5
-   |
-   |
-LL |     vec.sort_by(|a, b| (a + 5).abs().cmp(&(b + 5).abs()));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vec.sort_by_key(|a| (a + 5).abs())`
-error: consider using `sort_by_key`
-  --> tests/ui/unnecessary_sort_by.rs:15:5
-   |
-   |
-LL |     vec.sort_unstable_by(|a, b| id(-a).cmp(&id(-b)));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vec.sort_unstable_by_key(|a| id(-a))`
-error: consider using `sort_by_key`
-  --> tests/ui/unnecessary_sort_by.rs:18:5
-   |
-   |
-LL |     vec.sort_by(|a, b| (b + 5).abs().cmp(&(a + 5).abs()));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vec.sort_by_key(|b| std::cmp::Reverse((b + 5).abs()))`
-error: consider using `sort_by_key`
-  --> tests/ui/unnecessary_sort_by.rs:19:5
-   |
-   |
-LL |     vec.sort_unstable_by(|a, b| id(-b).cmp(&id(-a)));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vec.sort_unstable_by_key(|b| std::cmp::Reverse(id(-b)))`
-error: consider using `sort_by_key`
-  --> tests/ui/unnecessary_sort_by.rs:29:5
-   |
-   |
-LL |     vec.sort_by(|a, b| (***a).abs().cmp(&(***b).abs()));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vec.sort_by_key(|a| (***a).abs())`
-error: consider using `sort_by_key`
-  --> tests/ui/unnecessary_sort_by.rs:30:5
-   |
-   |
-LL |     vec.sort_unstable_by(|a, b| (***a).abs().cmp(&(***b).abs()));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `vec.sort_unstable_by_key(|a| (***a).abs())`
-error: consider using `sort_by_key`
-  --> tests/ui/unnecessary_sort_by.rs:89:9
-   |
-   |
-LL |         args.sort_by(|a, b| a.name().cmp(&b.name()));
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.sort_by_key(|a| a.name())`
-error: consider using `sort_by_key`
-  --> tests/ui/unnecessary_sort_by.rs:90:9
-   |
-   |
-LL |         args.sort_unstable_by(|a, b| a.name().cmp(&b.name()));
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.sort_unstable_by_key(|a| a.name())`
-error: consider using `sort_by_key`
-  --> tests/ui/unnecessary_sort_by.rs:92:9
-   |
-   |
-LL |         args.sort_by(|a, b| b.name().cmp(&a.name()));
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.sort_by_key(|b| std::cmp::Reverse(b.name()))`
-error: consider using `sort_by_key`
-  --> tests/ui/unnecessary_sort_by.rs:93:9
-   |
-   |
-LL |         args.sort_unstable_by(|a, b| b.name().cmp(&a.name()));
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.sort_unstable_by_key(|b| std::cmp::Reverse(b.name()))`
-error: aborting due to 12 previous errors
-


---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/unused_enumerate_index.stderr` to the actual output
--- tests/ui/unused_enumerate_index.stderr
+++ <stderr output>
 error: you seem to use `.enumerate()` and immediately discard the index
... 20 lines skipped ...
    |         ~    ~~~~~
 
 
-error: you seem to use `.enumerate()` and immediately discard the index
 
 
-error: you seem to use `.enumerate()` and immediately discard the index
-   |
-   |
-LL |     let p = vec![1, 2, 3].into_iter().enumerate();
-   |
-help: remove the `.enumerate()` call
-   |
-   |
-LL ~     let p = vec![1, 2, 3].into_iter();
-LL ~     p.map(|x| println!("{x}"));
-
-
-error: you seem to use `.enumerate()` and immediately discard the index
-   |
-   |
-LL |     _ = mac2!().enumerate().map(|(_, _v)| {});
-   |
-help: remove the `.enumerate()` call
-   |
-   |
-LL -     _ = mac2!().enumerate().map(|(_, _v)| {});
-LL +     _ = mac2!().map(|_v| {});
-
-
-error: you seem to use `.enumerate()` and immediately discard the index
-   |
-   |
-LL |     let v = [1, 2, 3].iter().copied().enumerate();
-   |
-help: remove the `.enumerate()` call
-   |
-   |
-LL ~     let v = [1, 2, 3].iter().copied();
-LL ~     let x = v.map(|x: i32| x).sum::<i32>();
-
-
-error: you seem to use `.enumerate()` and immediately discard the index
-   |
-   |
-LL |     let v = [1, 2, 3].iter().copied().enumerate();
-   |
-help: remove the `.enumerate()` call
-   |
-   |
-LL ~     let v = [1, 2, 3].iter().copied();
-LL ~     let x = v.map(|x: i32| x).sum::<i32>();
-
-
-error: you seem to use `.enumerate()` and immediately discard the index
-   |
-   |
-LL |     let v = [1, 2, 3].iter().copied().enumerate();
-   |
-help: remove the `.enumerate()` call
-   |
-   |
-LL ~     let v = [1, 2, 3].iter().copied();
-LL ~     let x = v.map(|x| x).sum::<i32>();
-
-error: aborting due to 8 previous errors
-

---
-
-error: `Vec<T>` is already on the heap, the boxing is unnecessary
-  --> tests/ui/vec_box_sized.rs:30:21
-   |
-LL |         sized_type: Vec<Box<SizedStruct>>,
-   |                     ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`
-error: `Vec<T>` is already on the heap, the boxing is unnecessary
-  --> tests/ui/vec_box_sized.rs:33:14
-   |
-   |
-LL |     struct A(Vec<Box<SizedStruct>>);
-   |              ^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<SizedStruct>`
-error: `Vec<T>` is already on the heap, the boxing is unnecessary
-  --> tests/ui/vec_box_sized.rs:34:18
-   |
-   |
-LL |     struct B(Vec<Vec<Box<(u32)>>>);
-   |                  ^^^^^^^^^^^^^^^ help: try: `Vec<u32>`
-error: `Vec<T>` is already on the heap, the boxing is unnecessary
-  --> tests/ui/vec_box_sized.rs:36:42
-   |
-LL |     fn allocator_global_defined_vec() -> Vec<Box<i32>, std::alloc::Global> {
-LL |     fn allocator_global_defined_vec() -> Vec<Box<i32>, std::alloc::Global> {
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
-
-error: `Vec<T>` is already on the heap, the boxing is unnecessary
-  --> tests/ui/vec_box_sized.rs:39:42
-   |
-LL |     fn allocator_global_defined_box() -> Vec<Box<i32, std::alloc::Global>> {
-   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
-error: `Vec<T>` is already on the heap, the boxing is unnecessary
-  --> tests/ui/vec_box_sized.rs:42:29
-   |
-   |
-LL |     fn allocator_match() -> Vec<Box<i32, DummyAllocator>, DummyAllocator> {
-   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Vec<i32>`
-error: `Vec<T>` is already on the heap, the boxing is unnecessary
-  --> tests/ui/vec_box_sized.rs:79:23
-   |
-   |
-LL |         pub fn f() -> Vec<Box<S>> {
-   |                       ^^^^^^^^^^^ help: try: `Vec<S>`
-error: aborting due to 9 previous errors
-




FAILED TEST: tests/ui/waker_clone_wake.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/waker_clone_wake.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/waker_clone_wake.stderr` to the actual output
--- tests/ui/waker_clone_wake.stderr
-error: cloning a `Waker` only to wake it
-  --> tests/ui/waker_clone_wake.rs:15:5
-   |
-   |
-LL |     cx.waker().clone().wake();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `cx.waker().wake_by_ref()`
-   = note: `-D clippy::waker-clone-wake` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::waker_clone_wake)]`
-
-error: cloning a `Waker` only to wake it
-error: cloning a `Waker` only to wake it
-  --> tests/ui/waker_clone_wake.rs:17:5
-   |
-LL |     mac!(cx).clone().wake();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `mac!(cx).wake_by_ref()`
-error: aborting due to 2 previous errors
-


---
-
-error: offset calculation on zero-sized value
-  --> tests/ui/zero_offset.rs:10:9
-   |
-LL |         m.sub(0);
-
-error: offset calculation on zero-sized value
-  --> tests/ui/zero_offset.rs:12:9
-   |
---
-
-error: offset calculation on zero-sized value
-  --> tests/ui/zero_offset.rs:20:9
-   |
-LL |         c.sub(0);
-
-error: offset calculation on zero-sized value
-  --> tests/ui/zero_offset.rs:22:9
-   |
-   |
-LL |         c.wrapping_sub(0);
-   |         ^^^^^^^^^^^^^^^^^
-
-error: aborting due to 8 previous errors
-


error: `offset calculation on zero-sized value` not found in diagnostics on line 5
  |
  |
6 |         //~^ ERROR: offset calculation on zero-sized value
  |


error: ``#[deny(clippy::zst_offset)]` on by default` not found in diagnostics on line 5
  |
  |
7 |         //~| NOTE: `#[deny(clippy::zst_offset)]` on by default
  |


error: `offset calculation on zero-sized value` not found in diagnostics on line 8
  |
  |
9 |         //~^ ERROR: offset calculation on zero-sized value
  |


error: `offset calculation on zero-sized value` not found in diagnostics on line 10
   |
   |
11 |         //~^ ERROR: offset calculation on zero-sized value
   |


error: `offset calculation on zero-sized value` not found in diagnostics on line 12
   |
   |
13 |         //~^ ERROR: offset calculation on zero-sized value
   |


error: `offset calculation on zero-sized value` not found in diagnostics on line 16
   |
   |
17 |         //~^ ERROR: offset calculation on zero-sized value
   |


error: `offset calculation on zero-sized value` not found in diagnostics on line 18
   |
   |
19 |         //~^ ERROR: offset calculation on zero-sized value
   |


error: `offset calculation on zero-sized value` not found in diagnostics on line 20
   |
   |
21 |         //~^ ERROR: offset calculation on zero-sized value
   |


error: `offset calculation on zero-sized value` not found in diagnostics on line 22
   |
   |
23 |         //~^ ERROR: offset calculation on zero-sized value
   |


FAILED TEST: tests/ui/zero_ptr.rs
FAILED TEST: tests/ui/zero_ptr.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/zero_ptr.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/zero_ptr.stderr` to the actual output
--- tests/ui/zero_ptr.stderr
+++ <stderr output>
-error: `0 as *const _` detected
-   |
-LL |     let _ = 0 as *const usize;
-   |             ^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::<usize>()`
-   |
-   |
-   = note: `-D clippy::zero-ptr` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::zero_ptr)]`
-
-error: `0 as *mut _` detected
-   |
-LL |     let _ = 0 as *mut f64;
-LL |     let _ = 0 as *mut f64;
-   |             ^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::<f64>()`
-
-error: `0 as *const _` detected
-   |
-   |
-LL |     let _: *const u8 = 0 as *const _;
-   |                        ^^^^^^^^^^^^^ help: try: `std::ptr::null()`
-
-error: `0 as *const _` detected
-   |
-   |
-LL |     foo(0 as *const _, 0 as *mut _);
-   |         ^^^^^^^^^^^^^ help: try: `std::ptr::null()`
-
-error: `0 as *mut _` detected
-   |
-   |
-LL |     foo(0 as *const _, 0 as *mut _);
-   |                        ^^^^^^^^^^^ help: try: `std::ptr::null_mut()`
-error: aborting due to 5 previous errors
-




FAILED TEST: tests/ui/cmp_owned/comparison_flip.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/cmp_owned" "tests/ui/cmp_owned/comparison_flip.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/cmp_owned/comparison_flip.stderr` to the actual output
--- tests/ui/cmp_owned/comparison_flip.stderr
-error: this creates an owned instance just for comparison
-  --> tests/ui/cmp_owned/comparison_flip.rs:6:8
-   |
-   |
-LL |     if a.to_string() != "bar" {
-   |        ^^^^^^^^^^^^^ help: try: `a`
-   = note: `-D clippy::cmp-owned` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::cmp_owned)]`
-
-error: this creates an owned instance just for comparison
-error: this creates an owned instance just for comparison
-  --> tests/ui/cmp_owned/comparison_flip.rs:10:17
-   |
-LL |     if "bar" != a.to_string() {
-   |        |
-   |        |
-   |        help: try: `a != "bar"`
-error: aborting due to 2 previous errors
-


---
+++ <stderr output>
-error: this creates an owned instance just for comparison
-  --> tests/ui/cmp_owned/asymmetric_partial_eq.rs:46:12
-   |
-LL |         if borrowed.to_owned() == owned {}
-   |            ^^^^^^^^^^^^^^^^^^^ help: try: `borrowed`
-   = note: `-D clippy::cmp-owned` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::cmp_owned)]`
-
-error: this creates an owned instance just for comparison
-error: this creates an owned instance just for comparison
-  --> tests/ui/cmp_owned/asymmetric_partial_eq.rs:47:21
-   |
-LL |         if owned == borrowed.to_owned() {}
-   |            |
-   |            |
-   |            help: try: `borrowed == owned`
-error: this creates an owned instance just for comparison
-  --> tests/ui/cmp_owned/asymmetric_partial_eq.rs:65:21
-   |
-   |
-LL |         if owned == borrowed.to_owned() {}
-   |                     ^^^^^^^^^^^^^^^^^^^ help: try: `borrowed`
-error: this creates an owned instance just for comparison
-  --> tests/ui/cmp_owned/asymmetric_partial_eq.rs:66:12
-   |
-   |
-LL |         if borrowed.to_owned() == owned {}
-   |            |
-   |            |
-   |            help: try: `owned == borrowed`
-error: this creates an owned instance just for comparison
-  --> tests/ui/cmp_owned/asymmetric_partial_eq.rs:92:20
-   |
-   |
-LL |         if "Hi" == borrowed.to_string() {}
-   |            |
-   |            |
-   |            help: try: `borrowed == "Hi"`
-error: this creates an owned instance just for comparison
-  --> tests/ui/cmp_owned/asymmetric_partial_eq.rs:93:12
-   |
-   |
-LL |         if borrowed.to_string() == "Hi" {}
-   |            ^^^^^^^^^^^^^^^^^^^^ help: try: `borrowed`
-error: aborting due to 6 previous errors
-


---
+++ <stderr output>
-error: empty string literal in `println!`
-  --> tests/ui/crashes/ice-10148.rs:8:5
-   |
-LL |     println!(with_span!(""something ""));
-   |                         |
-   |                         help: remove the empty string
-   |
-   = note: `-D clippy::println-empty-string` implied by `-D warnings`
---
+++ <stderr output>
-error: this creates an owned instance just for comparison
-  --> tests/ui/cmp_owned/without_suggestion.rs:7:5
-   |
-LL |     y.to_owned() == *x;
-   |
-   = note: `-D clippy::cmp-owned` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::cmp_owned)]`
-
-
-error: this creates an owned instance just for comparison
-  --> tests/ui/cmp_owned/without_suggestion.rs:13:5
-   |
-LL |     y.to_owned() == **x;
-
-error: this creates an owned instance just for comparison
-  --> tests/ui/cmp_owned/without_suggestion.rs:25:9
-   |
-   |
-LL |         self.to_owned() == *other
-
-error: aborting due to 3 previous errors
-



error: `this creates an owned instance just for comparison` not found in diagnostics on line 7
##[error] --> tests/ui/cmp_owned/without_suggestion.rs:8:17
  |
8 |     //~^ ERROR: this creates an owned instance just for comparison
  |


error: ``-D clippy::cmp-owned` implied by `-D warnings`` not found in diagnostics on line 7
  |
  |
9 |     //~| NOTE: `-D clippy::cmp-owned` implied by `-D warnings`
  |

error: `this creates an owned instance just for comparison` not found in diagnostics on line 13
##[error]  --> tests/ui/cmp_owned/without_suggestion.rs:14:17
##[error]  --> tests/ui/cmp_owned/without_suggestion.rs:14:17
   |
14 |     //~^ ERROR: this creates an owned instance just for comparison
   |

error: `this creates an owned instance just for comparison` not found in diagnostics on line 25
##[error]  --> tests/ui/cmp_owned/without_suggestion.rs:26:21
##[error]  --> tests/ui/cmp_owned/without_suggestion.rs:26:21
   |
26 |         //~^ ERROR: this creates an owned instance just for comparison
   |


FAILED TEST: tests/ui/crashes/ice-360.rs
---
-   | |_____^
-   |
-   = note: `#[deny(clippy::never_loop)]` on by default
-
-error: this loop could be written as a `while let` loop
-   |
-LL | /     loop {
-LL | |
-LL | |
-LL | |
-LL | |
-...  |
-LL | |
-LL | |     }
-   | |_____^ help: try: `while let Some(ele) = iter.next() { .. }`
-   = note: `-D clippy::while-let-loop` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::while_let_loop)]`
-
-
-error: empty `loop {}` wastes CPU cycles
-   |
-LL |         loop {}
-   |         ^^^^^^^
-   |
-   |
-   = help: you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body
-   = help: to override `-D warnings` add `#[allow(clippy::empty_loop)]`
-
-error: aborting due to 3 previous errors
-
---
6 |         //~^ ERROR: this loop never actually loops
  |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
  |

error: `this loop could be written as a `while let` loop` not found in diagnostics on line 5
  |
  |
7 |         //~| ERROR: this loop could be written as a `while let` loop
  |


error: ``-D clippy::while-let-loop` implied by `-D warnings`` not found in diagnostics on line 5
  |
  |
8 |         //~| NOTE: `-D clippy::while-let-loop` implied by `-D warnings`
  |


error: `empty `loop {}` wastes CPU cycles` not found in diagnostics on line 13
   |
   |
14 |         //~^ ERROR: empty `loop {}` wastes CPU cycles
   |


FAILED TEST: tests/ui/crashes/ice-2774.rs
---
+++ <stderr output>
-error: the following explicit lifetimes could be elided: 'a
-  --> tests/ui/crashes/ice-2774.rs:15:28
-   |
-LL | pub fn add_barfoos_to_foos<'a>(bars: &HashSet<&'a Bar>) {
-   |
-   = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
-help: elide the lifetimes
-help: elide the lifetimes
-   |
-LL - pub fn add_barfoos_to_foos<'a>(bars: &HashSet<&'a Bar>) {
-LL + pub fn add_barfoos_to_foos(bars: &HashSet<&Bar>) {
-
-error: aborting due to 1 previous error
-

---
16 |     //~^ ERROR: the following explicit lifetimes could be elided: 'a
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
   |

error: ``-D clippy::needless-lifetimes` implied by `-D warnings`` not found in diagnostics on line 15
   |
   |
17 |     //~| NOTE: `-D clippy::needless-lifetimes` implied by `-D warnings`
   |


FAILED TEST: tests/ui/crashes/ice-7869.rs
---
-  --> tests/ui/crashes/ice-7869.rs:1:1
-   |
-LL | / enum Tila {
-LL | |
-LL | |     TyöAlkoi,
-LL | |     TyöKeskeytyi,
-LL | |     TyöValmis,
-   | |_^
-   |
-   = help: remove the prefixes and use full paths to the variants instead of glob imports
-   = note: `-D clippy::enum-variant-names` implied by `-D warnings`
-   = note: `-D clippy::enum-variant-names` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::enum_variant_names)]`
-
-error: aborting due to 1 previous error
-


error: `all variants have the same prefix: `Työ`` not found in diagnostics on line 1
  |
2 |     //~^ ERROR: all variants have the same prefix: `Työ`
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
  |
---
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/crashes/ice-7169.stderr` to the actual output
--- tests/ui/crashes/ice-7169.stderr
+++ <stderr output>
-error: redundant pattern matching, consider using `is_ok()`
-   |
-   |
-LL |     if let Ok(_) = Ok::<_, ()>(A::<String>::default()) {}
-   |     -------^^^^^-------------------------------------- help: try: `if Ok::<_, ()>(A::<String>::default()).is_ok()`
-   = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::redundant_pattern_matching)]`
-
-error: aborting due to 1 previous error
-error: aborting due to 1 previous error
-


error: `redundant pattern matching, consider using `is_ok()`` not found in diagnostics on line 10
   |
   |
11 |     //~^ ERROR: redundant pattern matching, consider using `is_ok()`
   |


error: ``-D clippy::redundant-pattern-matching` implied by `-D warnings`` not found in diagnostics on line 10
   |
   |
12 |     //~| NOTE: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
   |


FAILED TEST: tests/ui/crashes/ice-8250.rs
---
+++ <stderr output>
-error: unnecessary use of `splitn`
-  --> tests/ui/crashes/ice-8250.rs:2:13
-   |
-LL |     let _ = s[1..].splitn(2, '.').next()?;
-   |             ^^^^^^^^^^^^^^^^^^^^^ help: try: `s[1..].split('.')`
-   = note: `-D clippy::needless-splitn` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::needless_splitn)]`
-
-error: aborting due to 1 previous error
-error: aborting due to 1 previous error
-


error: `unnecessary use of `splitn`` not found in diagnostics on line 2
  |
  |
3 |     //~^ ERROR: unnecessary use of `splitn`
  |


error: ``-D clippy::needless-splitn` implied by `-D warnings`` not found in diagnostics on line 2
  |
  |
4 |     //~| NOTE: `-D clippy::needless-splitn` implied by `-D warnings`
  |


FAILED TEST: tests/ui/crashes/ice-9041.rs
FAILED TEST: tests/ui/crashes/ice-9041.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-1b2c2b15b1e037a5.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-99ba46652e227cf4.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-8b0736b9eceb5106.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-82124c4abe2543b7.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-49fd91c51cbf146b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-a4b4cb2e17d4d2b3.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-86c814e7d2dcaea3.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b744b7afdf892bbc.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-8c7ebaf9a3b84e6b.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cbf44177ae8fe989.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9643bce3ae79c2a9.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-bf68a607902d38a6.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-801f8435cf206689.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/crashes" "tests/ui/crashes/ice-9041.rs" "--edition" "2021"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/crashes/ice-9041.stderr` to the actual output
--- tests/ui/crashes/ice-9041.stderr
+++ <stderr output>
-error: called `is_some()` after searching an `Iterator` with `find`
-   |
-   |
-LL |     things.iter().find(|p| is_thing_ready(p)).is_some()
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|p| is_thing_ready(&p))`
-   = note: `-D clippy::search-is-some` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::search_is_some)]`
-
-error: aborting due to 1 previous error
-error: aborting due to 1 previous error
-


error: `called `is_some()` after searching an `Iterator` with `find`` not found in diagnostics on line 5
  |
  |
6 |     //~^ ERROR: called `is_some()` after searching an `Iterator` with `find`
  |


error: ``-D clippy::search-is-some` implied by `-D warnings`` not found in diagnostics on line 5
  |
  |
7 |     //~| NOTE: `-D clippy::search-is-some` implied by `-D warnings`
  |


FAILED TEST: tests/ui/crashes/ice-9445.rs
---
+++ <stderr output>
-error: a `const` item should not be interior mutable
-  --> tests/ui/crashes/ice-9445.rs:1:1
-   |
-LL | const UNINIT: core::mem::MaybeUninit<core::cell::Cell<&'static ()>> = core::mem::MaybeUninit::uninit();
-   |
-   |
-   = help: consider making this `Sync` so that it can go in a static item or using a `thread_local`
-   = help: to override `-D warnings` add `#[allow(clippy::declare_interior_mutable_const)]`
-
-error: aborting due to 1 previous error
-
---
5 |     //~^ ERROR: returning the result of a `let` binding from a block
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
  |

error: ``-D clippy::let-and-return` implied by `-D warnings`` not found in diagnostics on line 4
  |
  |
6 |     //~| NOTE: `-D clippy::let-and-return` implied by `-D warnings`
  |

error: `returning the result of a `let` binding from a block` not found in diagnostics on line 12
##[error]  --> tests/ui/crashes/ice-8850.rs:13:17
---
+++ <stderr output>
 error: this if-then-else expression returns a bool literal
   --> tests/ui/needless_bool/fixable.rs:41:5
... 129 lines skipped ...
    | |_____^ help: you can reduce it to: `return !(x && y)`
-error: equality checks against true are unnecessary
-  --> tests/ui/needless_bool/fixable.rs:144:8
-   |
-   |
-LL |     if x == true {};
-   |        ^^^^^^^^^ help: try simplifying it as shown: `x`
-   = note: `-D clippy::bool-comparison` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::bool_comparison)]`
-
-error: equality checks against false can be replaced by a negation
-error: equality checks against false can be replaced by a negation
-  --> tests/ui/needless_bool/fixable.rs:148:8
-   |
-LL |     if x == false {};
-   |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`
-error: equality checks against true are unnecessary
-  --> tests/ui/needless_bool/fixable.rs:158:8
-   |
-   |
-LL |     if x == true {};
-   |        ^^^^^^^^^ help: try simplifying it as shown: `x`
-error: equality checks against false can be replaced by a negation
-  --> tests/ui/needless_bool/fixable.rs:159:8
-   |
-   |
-LL |     if x == false {};
-   |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`
 error: this if-then-else expression returns a bool literal
   --> tests/ui/needless_bool/fixable.rs:168:12
... 47 lines skipped ...
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `a`

@bors
Copy link
Contributor

bors commented Dec 3, 2024

☀️ Try build successful - checks-actions
Build commit: 70d22e5 (70d22e507ccc4fd2131df47d55028ed92973d588)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (70d22e5): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.1%, 0.3%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -2.5%, secondary 2.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.1% [0.4%, 6.2%] 6
Improvements ✅
(primary)
-2.5% [-4.1%, -1.0%] 2
Improvements ✅
(secondary)
-3.9% [-3.9%, -3.9%] 1
All ❌✅ (primary) -2.5% [-4.1%, -1.0%] 2

Cycles

Results (secondary 9.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
9.8% [9.8%, 9.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 767.322s -> 766.364s (-0.12%)
Artifact size: 332.21 MiB -> 332.20 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 3, 2024
@Dylan-DPC Dylan-DPC added S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants