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

Stop skewing inference in ?'s desugaring #122412

Conversation

WaffleLapkin
Copy link
Member

NB: this is a breaking change (although arguably a bug fix) and as such shouldn't be taken lightly.

This changes expr?'s desugaring like so (simplified, see code for more info):

// old
match expr {
    Ok(val) => val,
    Err(err) => return Err(err),
}

// new
match expr {
    Ok(val) => val,
    Err(err) => core::convert::absurd(return Err(err)),
}

// core::convert
pub const fn absurd<T>(x: !) -> T { x }

This prevents ! from the return from skewing inference:

// previously: ok (never type spontaneous decay skews inference, `T = ()`)
// with this pr: can't infer the type for `T`
Err(())?;

Fixes #51125
Closes #39216

@rustbot
Copy link
Collaborator

rustbot commented Mar 12, 2024

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 12, 2024
@rust-log-analyzer

This comment has been minimized.

@fmease fmease added the needs-fcp This change is insta-stable, so needs a completed FCP to proceed. label Mar 13, 2024
@scottmcm scottmcm added the I-lang-nominated Nominated for discussion during a lang team meeting. label Mar 13, 2024
/// This is possible because `!` is uninhabited (has no values), so this function can't actually
/// be ever called at runtime.
///
/// Even though `!` can be coerced to any type implicitly anyway (and indeed this function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"function is implemented"

@nnethercote
Copy link
Contributor

I have skimmed this PR and gave minor comments, but this kind of subtle lang/libs/type system change is the kind of thing I am perfectly not suited to reviewing. The "needs-fcp" and "I-lang-nominated" labels have been added, so this clearly will get some scrutiny via other channels, but I will take a guess at a suitable reviewer and reassign anyway...

r? @cuviper

@rustbot rustbot assigned cuviper and unassigned nnethercote Mar 13, 2024
@cuviper
Copy link
Member

cuviper commented Mar 14, 2024

Is convert::absurd meant to be permanently unstable? If not, then it will need libs-api review.

@WaffleLapkin
Copy link
Member Author

@cuviper I think it could plausibly become stable, at least if/when ! is stabilized

@cuviper
Copy link
Member

cuviper commented Mar 18, 2024

OK, well the actual implementation of absurd is not interesting, so let's get an API person to look...

r? libs-api

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Mar 18, 2024
@rustbot rustbot assigned Amanieu and unassigned cuviper Mar 18, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 20, 2024
Do not use `?`-induced skewing of type inference in the compiler

This prevents breakage from rust-lang#122412 and is generally a good idea.

r? `@estebank`
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 20, 2024
Rollup merge of rust-lang#122540 - WaffleLapkin:ununexpected, r=estebank

Do not use `?`-induced skewing of type inference in the compiler

This prevents breakage from rust-lang#122412 and is generally a good idea.

r? `@estebank`
@Amanieu
Copy link
Member

Amanieu commented Mar 20, 2024

API-wise this seems fine to add as unstable. I presume the next step is a crater run to evaluate the impact?

@chorman0773
Copy link
Contributor

FTR, I've commonly used Err(e)? for return Err(e) - if this will cause issues in if/else blocks particularily, that would be a potential issue for my code.

@scottmcm
Copy link
Member

We were unsure about how to think about this PR in the triage meeting today.

Looking at this in particular,

This prevents ! from the return from skewing inference:

it made me wonder whether it would be feasible to change return in general to be a free type variable instead of !? If it's good doing here, why wouldn't we want it for all returns and breaks and such.

@WaffleLapkin
Copy link
Member Author

it made me wonder whether it would be feasible to change return in general to be a free type variable instead of !?

@scottmcm I'm not sure. I don't think it's unfeasible, but it sure is harder than this.

The issues are:

  • Need to add fallback for those type variables too, so that return; works
  • { return; } (which is currently ! even though there is ;) needs to be special cased in a different way
  • Will break strictly more things

I'm not sure if this is a good idea or not. It's kinda weird.

@WaffleLapkin
Copy link
Member Author

I presume the next step is a crater run to evaluate the impact?

@Amanieu yes.

@WaffleLapkin
Copy link
Member Author

WaffleLapkin commented Mar 20, 2024

@chorman0773 can you explain what you mean by "if this will cause issues in if/else blocks particularily"?

This PR makes all Err(..)?; be compile time errors, the only way to avoid this is to specify the type with a turbofish (Err::<T, _>(..)?;). Upd: or you can let the type be inferenced on other ways such as () = Err(..)?;

@WaffleLapkin WaffleLapkin added T-lang Relevant to the language team, which will review and decide on the PR/issue. and removed T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 5, 2024
@bors
Copy link
Contributor

bors commented Apr 5, 2024

⌛ Trying commit b288d58 with merge 645bb72...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 5, 2024
…-operator-to-not-screw-with-inference-will-it-obey, r=<try>

Stop skewing inference in ?'s desugaring

**NB**: this is a breaking change (although arguably a bug fix) and as such shouldn't be taken lightly.

This changes `expr?`'s desugaring like so (simplified, see code for more info):
```rust
// old
match expr {
    Ok(val) => val,
    Err(err) => return Err(err),
}

// new
match expr {
    Ok(val) => val,
    Err(err) => core::convert::absurd(return Err(err)),
}

// core::convert
pub const fn absurd<T>(x: !) -> T { x }
```

This prevents `!` from the `return` from skewing inference:
```rust
// previously: ok (never type spontaneous decay skews inference, `T = ()`)
// with this pr: can't infer the type for `T`
Err(())?;
```

Fixes rust-lang#51125
Closes rust-lang#39216
bors added a commit to rust-lang/cargo that referenced this pull request Apr 5, 2024
Don't depend on `?` affecting type inference in weird ways

This is likely to stop working in the future versions of Rust, see rust-lang/rust#122412 (comment).
@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)

     Running tests/compile-test.rs (obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/compile_test-453d830fd0023675)

FAILED TEST: tests/ui/bind_instead_of_map.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/bind_instead_of_map.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/bind_instead_of_map.stderr` to the actual output
--- tests/ui/bind_instead_of_map.stderr
+++ <stderr output>
+++ <stderr output>
 error: using `Option.and_then(Some)`, which is a no-op
... 20 lines skipped ...
    |             ^^^^^^^^^^^^^^ help: use the expression directly: `x`
 
-error: aborting due to 3 previous errors
-error: aborting due to 3 previous errors
+error: sub-expression diverges
 
+error: aborting due to 4 previous errors
+


full stderr:
error: using `Option.and_then(Some)`, which is a no-op
   |
   |
LL |     let _ = x.and_then(Some);
   |             ^^^^^^^^^^^^^^^^ help: use the expression directly: `x`
note: the lint level is defined here
  --> tests/ui/bind_instead_of_map.rs:1:9
   |
LL | #![deny(clippy::bind_instead_of_map)]
LL | #![deny(clippy::bind_instead_of_map)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
   |
   |
LL |     let _ = x.and_then(|o| Some(o + 1));
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.map(|o| o + 1)`

error: using `Result.and_then(Ok)`, which is a no-op
   |
   |
LL |     let _ = x.and_then(Ok);
   |             ^^^^^^^^^^^^^^ help: use the expression directly: `x`
error: sub-expression diverges
##[error]  --> tests/ui/bind_instead_of_map.rs:20:68
   |
   |
LL |     Some("hello".to_owned()).and_then(|s| Some(format!("{}{}", s, x?)))
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`

---



FAILED TEST: tests/ui/almost_complete_range.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/auxiliary" "tests/ui/auxiliary/proc_macros.rs" "--edition" "2021" "--emit=link"
error: aux build from tests/ui/almost_complete_range.rs:2 failed
error: compilation of aux build failed failed with exit status: 1


---

error: sub-expression diverges
##[error]  --> tests/ui/auxiliary/proc_macros.rs:115:72
   |
LL |                 write_with_span(s, g.stream().into_iter(), &mut stream)?;

error: sub-expression diverges
##[error]  --> tests/ui/auxiliary/proc_macros.rs:234:54
   |
   |
LL |         inner.expand(body.stream().into_iter(), self)?;

error: sub-expression diverges
##[error]  --> tests/ui/auxiliary/proc_macros.rs:354:18
   |
---

error: sub-expression diverges
##[error]  --> tests/ui/auxiliary/proc_macros.rs:421:57
   |
LL |                 self.expand(g.stream().into_iter(), mac)?;

error: sub-expression diverges
##[error]  --> tests/ui/auxiliary/proc_macros.rs:445:18
   |
---

error: sub-expression diverges
##[error]  --> tests/ui/auxiliary/proc_macros.rs:463:59
   |
LL |                 mac.insert(name.span(), p.span(), g, self)?;

error: sub-expression diverges
##[error]  --> tests/ui/auxiliary/proc_macros.rs:468:39
   |
   |
LL |                 self.write_tt(tt, mac)?;

error: aborting due to 10 previous errors


---



FAILED TEST: tests/ui/borrow_deref_ref.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/borrow_deref_ref.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/blocks_in_conditions.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/auxiliary" "tests/ui/auxiliary/proc_macro_attr.rs" "--edition" "2021" "--emit=link"
error: aux build from tests/ui/blocks_in_conditions.rs:1 failed
error: compilation of aux build failed failed with exit status: 1



full stderr:
error: sub-expression diverges
##[error]  --> tests/ui/auxiliary/proc_macro_attr.rs:53:41
   |
LL |         let arg = sig.inputs.first_mut()?;
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`

---



FAILED TEST: tests/ui/clone_on_copy.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/clone_on_copy.rs" "--edition" "2021"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/clone_on_copy.stderr` to the actual output
--- tests/ui/clone_on_copy.stderr
 error: using `clone` on type `i32` which implements the `Copy` trait
   --> tests/ui/clone_on_copy.rs:23:5
... 47 lines skipped ...
    |              ^^^^^^^^^^ help: try removing the `clone` call: `42`
    |              ^^^^^^^^^^ help: try removing the `clone` call: `42`
 
+error: sub-expression diverges
+  --> tests/ui/clone_on_copy.rs:75:28
+   |
+LL |     let value = opt.clone()?; // operator precedence needed (*opt)?
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
+
 error: using `clone` on type `Option<i32>` which implements the `Copy` trait
   --> tests/ui/clone_on_copy.rs:75:17
... 2 lines skipped ...
    |                 ^^^^^^^^^^^ help: try dereferencing it: `(*opt)`
-error: aborting due to 9 previous errors
+error: aborting due to 10 previous errors
 

---

error: using `clone` on type `i32` which implements the `Copy` trait
##[error]  --> 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
##[error]  --> 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
##[error]  --> 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
##[error]  --> 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
##[error]  --> 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
##[error]  --> tests/ui/clone_on_copy.rs:71:14
   |
   |
LL |     vec.push(42.clone());
   |              ^^^^^^^^^^ help: try removing the `clone` call: `42`
error: sub-expression diverges
##[error]  --> tests/ui/clone_on_copy.rs:75:28
   |
   |
LL |     let value = opt.clone()?; // operator precedence needed (*opt)?
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: using `clone` on type `Option<i32>` which implements the `Copy` trait
##[error]  --> 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 10 previous errors


full stdout:
full stdout:



FAILED TEST: tests/ui/default_numeric_fallback_f64.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/default_numeric_fallback_f64.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/default_numeric_fallback_i32.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/default_numeric_fallback_i32.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/default_trait_access.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/default_trait_access.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/deref_addrof.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/deref_addrof.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/deref_addrof_macro.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/deref_addrof_macro.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/doc_unsafe.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/doc_unsafe.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/empty_docs.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macro_attr.rs\" }"
error: aux build from tests/ui/empty_docs.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/empty_line_after_doc_comments.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macro_attr.rs\" }"
error: aux build from tests/ui/empty_line_after_doc_comments.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/empty_line_after_outer_attribute.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macro_attr.rs\" }"
error: aux build from tests/ui/empty_line_after_outer_attribute.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/empty_loop.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/empty_loop.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/equatable_if_let.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/equatable_if_let.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/extra_unused_type_parameters.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/extra_unused_type_parameters.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/field_reassign_with_default.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/field_reassign_with_default.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/filter_map_bool_then.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/filter_map_bool_then.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/four_forward_slashes.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/four_forward_slashes.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/from_str_radix_10.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/from_str_radix_10.rs" "--edition" "2021"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/from_str_radix_10.stderr` to the actual output
--- tests/ui/from_str_radix_10.stderr
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:28:34
+   |
+   |
+LL |     u32::from_str_radix("30", 10)?;
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
+
 error: this call to `from_str_radix` can be replaced with a call to `str::parse`
... 5 lines skipped ...
    = help: to override `-D warnings` add `#[allow(clippy::from_str_radix_10)]`
 
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:31:34
+   |
+LL |     i64::from_str_radix("24", 10)?;
+
+
 error: this call to `from_str_radix` can be replaced with a call to `str::parse`
... 2 lines skipped ...
... 2 lines skipped ...
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"24".parse::<i64>()`
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:33:37
+   |
+   |
+LL |     isize::from_str_radix("100", 10)?;
+
+
 error: this call to `from_str_radix` can be replaced with a call to `str::parse`
... 2 lines skipped ...
... 2 lines skipped ...
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"100".parse::<isize>()`
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:35:32
+   |
+   |
+LL |     u8::from_str_radix("7", 10)?;
+
+
 error: this call to `from_str_radix` can be replaced with a call to `str::parse`
... 2 lines skipped ...
... 2 lines skipped ...
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"7".parse::<u8>()`
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:37:54
+   |
+   |
+LL |     u16::from_str_radix(&("10".to_owned() + "5"), 10)?;
+
+
 error: this call to `from_str_radix` can be replaced with a call to `str::parse`
... 2 lines skipped ...
... 2 lines skipped ...
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `("10".to_owned() + "5").parse::<u16>()`
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:39:42
+   |
+   |
+LL |     i128::from_str_radix(Test + Test, 10)?;
+
+
 error: this call to `from_str_radix` can be replaced with a call to `str::parse`
... 2 lines skipped ...
... 2 lines skipped ...
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(Test + Test).parse::<i128>()`
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:43:36
+   |
+   |
+LL |     i32::from_str_radix(string, 10)?;
+
+
 error: this call to `from_str_radix` can be replaced with a call to `str::parse`
... 2 lines skipped ...
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `string.parse::<i32>()`
 
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:47:40
+   |
+LL |     i32::from_str_radix(&stringier, 10)?;
+
+
 error: this call to `from_str_radix` can be replaced with a call to `str::parse`
... 2 lines skipped ...
... 2 lines skipped ...
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stringier.parse::<i32>()`
-error: aborting due to 8 previous errors
+error: sub-expression diverges
 
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:52:34
+   |
+LL |     i32::from_str_radix("45", 12)?;
+
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:53:36
+   |
+   |
+LL |     usize::from_str_radix("10", 16)?;
+
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:54:35
+   |
+   |
+LL |     i128::from_str_radix("10", 13)?;
+
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:55:39
+   |
+   |
+LL |     some_mod::from_str_radix("50", 10)?;
+
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:56:38
+   |
+   |
+LL |     some_mod::from_str_radix("50", 6)?;
+
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:57:29
+   |
+   |
+LL |     from_str_radix("50", 10)?;
+
+error: sub-expression diverges
+  --> tests/ui/from_str_radix_10.rs:58:28
+   |
+   |
+LL |     from_str_radix("50", 6)?;
+
+error: aborting due to 24 previous errors
+



full stderr:
error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:28:34
   |
LL |     u32::from_str_radix("30", 10)?;
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: this call to `from_str_radix` can be replaced with a call to `str::parse`
   |
   |
LL |     u32::from_str_radix("30", 10)?;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"30".parse::<u32>()`
   |
   = note: `-D clippy::from-str-radix-10` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::from_str_radix_10)]`
error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:31:34
   |
   |
LL |     i64::from_str_radix("24", 10)?;


error: this call to `from_str_radix` can be replaced with a call to `str::parse`
   |
   |
LL |     i64::from_str_radix("24", 10)?;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"24".parse::<i64>()`
error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:33:37
   |
   |
LL |     isize::from_str_radix("100", 10)?;


error: this call to `from_str_radix` can be replaced with a call to `str::parse`
   |
   |
LL |     isize::from_str_radix("100", 10)?;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"100".parse::<isize>()`
error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:35:32
   |
   |
LL |     u8::from_str_radix("7", 10)?;


error: this call to `from_str_radix` can be replaced with a call to `str::parse`
   |
   |
LL |     u8::from_str_radix("7", 10)?;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"7".parse::<u8>()`
error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:37:54
   |
   |
LL |     u16::from_str_radix(&("10".to_owned() + "5"), 10)?;


error: this call to `from_str_radix` can be replaced with a call to `str::parse`
   |
   |
LL |     u16::from_str_radix(&("10".to_owned() + "5"), 10)?;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `("10".to_owned() + "5").parse::<u16>()`
error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:39:42
   |
   |
LL |     i128::from_str_radix(Test + Test, 10)?;


error: this call to `from_str_radix` can be replaced with a call to `str::parse`
   |
   |
LL |     i128::from_str_radix(Test + Test, 10)?;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(Test + Test).parse::<i128>()`
error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:43:36
   |
   |
LL |     i32::from_str_radix(string, 10)?;


error: this call to `from_str_radix` can be replaced with a call to `str::parse`
   |
   |
LL |     i32::from_str_radix(string, 10)?;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `string.parse::<i32>()`
error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:47:40
   |
   |
LL |     i32::from_str_radix(&stringier, 10)?;


error: this call to `from_str_radix` can be replaced with a call to `str::parse`
   |
   |
LL |     i32::from_str_radix(&stringier, 10)?;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stringier.parse::<i32>()`
error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:51:33
   |
   |
LL |     u16::from_str_radix("20", 3)?;

error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:52:34
   |
   |
LL |     i32::from_str_radix("45", 12)?;

error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:53:36
   |
   |
LL |     usize::from_str_radix("10", 16)?;

error: sub-expression diverges
##[error]  --> tests/ui/from_str_radix_10.rs:54:35
   |
---
 
+error: sub-expression diverges
+  --> tests/ui/if_same_then_else2.rs:97:18
+   |
+LL |         Ok("foo")?;
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
+
+error: sub-expression diverges
+  --> tests/ui/if_same_then_else2.rs:99:18
+   |
+LL |         Ok("foo")?;
+
 error: this `if` has identical blocks
   --> tests/ui/if_same_then_else2.rs:120:20
... 16 lines skipped ...
---
##[error]  --> tests/ui/if_same_then_else2.rs:15:13
   |
LL |       if true {
   |  _____________^
LL | |         for _ in &[42] {
LL | |             let foo: &Option<_> = &Some::<u8>(42);
LL | |             if foo.is_some() {
LL | |         }
LL | |     } else {
   | |_____^
   |
   |
note: same as this
  --> tests/ui/if_same_then_else2.rs:24:12
   |
LL |       } else {
   |  ____________^
LL | |         for _ in &[42] {
LL | |             let bar: &Option<_> = &Some::<u8>(42);
LL | |             if bar.is_some() {
LL | |         }
LL | |     }
   | |_____^
   | |_____^
   = note: `-D clippy::if-same-then-else` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::if_same_then_else)]`
error: this `if` has identical blocks
##[error]  --> tests/ui/if_same_then_else2.rs:36:13
   |
LL |       if true {
---
##[error]  --> tests/ui/if_same_then_else2.rs:43:13
   |
LL |       if true {
   |  _____________^
LL | |         if let (1, .., 3) = (1, 2, 3) {}
   | |_____^
   |
note: same as this
  --> tests/ui/if_same_then_else2.rs:45:12
  --> tests/ui/if_same_then_else2.rs:45:12
   |
LL |       } else {
   |  ____________^
LL | |         if let (1, .., 3) = (1, 2, 3) {}
   | |_____^

error: this `if` has identical blocks
##[error]  --> tests/ui/if_same_then_else2.rs:93:21
##[error]  --> tests/ui/if_same_then_else2.rs:93:21
   |
LL |     let _ = if true { f32::NAN } else { f32::NAN };
   |
note: same as this
  --> tests/ui/if_same_then_else2.rs:93:39
   |
   |
LL |     let _ = if true { f32::NAN } else { f32::NAN };

error: this `if` has identical blocks
##[error]  --> tests/ui/if_same_then_else2.rs:96:13
   |
   |
LL |       if true {
   |  _____________^
LL | |         Ok("foo")?;
   | |_____^
   |
note: same as this
  --> tests/ui/if_same_then_else2.rs:98:12
  --> tests/ui/if_same_then_else2.rs:98:12
   |
LL |       } else {
   |  ____________^
LL | |         Ok("foo")?;
   | |_____^

error: sub-expression diverges
##[error]  --> tests/ui/if_same_then_else2.rs:97:18
##[error]  --> tests/ui/if_same_then_else2.rs:97:18
   |
LL |         Ok("foo")?;
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: sub-expression diverges
##[error]  --> tests/ui/if_same_then_else2.rs:99:18
   |
LL |         Ok("foo")?;

error: this `if` has identical blocks
##[error]  --> tests/ui/if_same_then_else2.rs:120:20
   |
   |
LL |       } else if true {
   |  ____________________^
LL | |         let foo = "";
LL | |         return Ok(&foo[0..]);
   | |_____^
   |
note: same as this
  --> tests/ui/if_same_then_else2.rs:123:12
  --> tests/ui/if_same_then_else2.rs:123:12
   |
LL |       } else {
   |  ____________^
LL | |         let foo = "";
LL | |         return Ok(&foo[0..]);
   | |_____^

error: aborting due to 8 previous errors



full stdout:



FAILED TEST: tests/ui/if_then_some_else_none.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/if_then_some_else_none.rs" "--edition" "2021"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/if_then_some_else_none.stderr` to the actual output
--- tests/ui/if_then_some_else_none.stderr
 error: this could be simplified with `bool::then`
   --> tests/ui/if_then_some_else_none.rs:6:13
... 59 lines skipped ...
... 59 lines skipped ...
    = help: consider using `bool::then` like: `foo().then(|| { /* snippet */ 150 })`
-error: aborting due to 5 previous errors
+error: sub-expression diverges
 
+error: sub-expression diverges
---
   |
LL |       let _ = if foo() {
   |  _____________^
LL | |
LL | |         println!("true!");
LL | |         Some("foo")
LL | |         None
LL | |     };
   | |_____^
   |
   |
   = help: consider using `bool::then` like: `foo().then(|| { /* snippet */ "foo" })`
   = note: `-D clippy::if-then-some-else-none` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::if_then_some_else_none)]`
error: this could be simplified with `bool::then`
##[error]  --> tests/ui/if_then_some_else_none.rs:15:13
   |
   |
LL |       let _ = if matches!(true, true) {
LL | |
LL | |
LL | |         println!("true!");
LL | |         Some(matches!(true, false))
LL | |         None
LL | |     };
   | |_____^
   |
   |
   = help: consider using `bool::then` like: `matches!(true, true).then(|| { /* snippet */ matches!(true, false) })`
error: this could be simplified with `bool::then_some`
##[error]  --> tests/ui/if_then_some_else_none.rs:25:28
   |
   |
LL |     let _ = x.and_then(|o| if o < 32 { Some(o) } else { None });
   |
   |
   = help: consider using `bool::then_some` like: `(o < 32).then_some(o)`
error: this could be simplified with `bool::then_some`
##[error]  --> tests/ui/if_then_some_else_none.rs:30:13
   |
   |
LL |     let _ = if !x { Some(0) } else { None };
   |
   |
   = help: consider using `bool::then_some` like: `(!x).then_some(0)`
error: this could be simplified with `bool::then`
##[error]  --> tests/ui/if_then_some_else_none.rs:86:13
   |
LL |       let _ = if foo() {
LL |       let _ = if foo() {
   |  _____________^
LL | |
LL | |         println!("true!");
LL | |     } else {
LL | |         None
LL | |     };
   | |_____^
   | |_____^
   |
   = help: consider using `bool::then` like: `foo().then(|| { /* snippet */ 150 })`
error: sub-expression diverges
##[error]  --> tests/ui/if_then_some_else_none.rs:114:10
   |
   |
LL |         v?; // This is a potential early return, is not equivalent with `bool::then`
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`

---



FAILED TEST: tests/ui/inconsistent_struct_constructor.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/inconsistent_struct_constructor.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/infinite_loops.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/infinite_loops.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/into_iter_without_iter.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/into_iter_without_iter.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/iter_over_hash_type.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/iter_over_hash_type.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/iter_skip_zero.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/iter_skip_zero.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/iter_without_into_iter.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/iter_without_into_iter.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/large_enum_variant.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/large_enum_variant.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/let_underscore_untyped.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/let_underscore_untyped.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/let_with_type_underscore.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/let_with_type_underscore.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/let_and_return.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/let_and_return.rs" "--edition" "2021"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/let_and_return.stderr` to the actual output
--- tests/ui/let_and_return.stderr
 error: returning the result of a `let` binding from a block
   --> tests/ui/let_and_return.rs:9:5
... 40 lines skipped ...
    |
    |
 
+error: sub-expression diverges
+  --> tests/ui/let_and_return.rs:67:55
+   |
+LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
+...
+...
+LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: sub-expression diverges
+  --> tests/ui/let_and_return.rs:67:55
+   |
+LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
+...
+...
+LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
+   |
+   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/let_and_return.rs:67:55
+   |
+LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
+...
+...
+LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
+   |
+   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/let_and_return.rs:67:55
+   |
+LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
+...
+...
+LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
+   |
+   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/let_and_return.rs:67:55
+   |
+LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
+...
+...
+LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
+   |
+   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/let_and_return.rs:67:55
+   |
+LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
+...
+...
+LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
+   |
+   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/let_and_return.rs:67:55
+   |
+LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
+...
+...
+LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
+   |
+   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/let_and_return.rs:67:55
+   |
+LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
+...
+...
+LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
+   |
+   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)
+
 error: returning the result of a `let` binding from a block
---
   |     ---------- unnecessary `let` binding
LL |     x
   |     ^
   |
   = note: `-D clippy::let-and-return` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::let_and_return)]`
   |
LL ~     
LL ~     5
   |
---

error: returning the result of a `let` binding from a block
##[error]  --> tests/ui/let_and_return.rs:80:5
   |
LL |     let line = stdin.lock().lines().next().unwrap().unwrap();
   |     --------------------------------------------------------- unnecessary `let` binding
   |     ^^^^
   |
help: return the expression directly
   |
   |
LL ~     
LL ~     stdin.lock().lines().next().unwrap().unwrap()

error: sub-expression diverges
##[error]  --> tests/ui/let_and_return.rs:67:55
   |
   |
LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
...
...
LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)
   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)

error: sub-expression diverges
##[error]  --> tests/ui/let_and_return.rs:67:55
   |
LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
...
...
LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
   |
   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)

error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/let_and_return.rs:67:55
   |
LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
...
...
LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
   |
   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)

error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/let_and_return.rs:67:55
   |
LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
...
...
LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
   |
   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)

error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/let_and_return.rs:67:55
   |
LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
...
...
LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
   |
   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)

error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/let_and_return.rs:67:55
   |
LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
...
...
LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
   |
   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)

error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/let_and_return.rs:67:55
   |
LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
...
...
LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
   |
   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)

error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/let_and_return.rs:67:55
   |
LL |                 Ok(($({let $x = Decode::decode(&mut d)?; $x }),*))
...
...
LL | tuple_encode!(T0, T1, T2, T3, T4, T5, T6, T7);
   |
   = note: this error originates in the macro `tuple_encode` (in Nightly builds, run with -Z macro-backtrace for more info)

error: returning the result of a `let` binding from a block
---
   |             ^^^^^
   |
help: return the expression directly
   |
LL ~             
LL ~             (Arc::clone(&self.foo)) as _

error: returning the result of a `let` binding from a block
##[error]  --> tests/ui/let_and_return.rs:190:13
   |
   |
LL | /             let result = match self {
LL | |                 E::A(x) => x,
LL | |                 E::B(x) => x,
LL | |             };
   | |______________- unnecessary `let` binding
LL |               result
   |               ^^^^^^
   |
help: return the expression directly
help: return the expression directly
   |
LL ~             
LL | 
LL ~             (match self {
LL +                 E::A(x) => x,
LL +                 E::B(x) => x,
LL +             }) as _

error: aborting due to 13 previous errors



full stdout:



FAILED TEST: tests/ui/lines_filter_map_ok.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/lines_filter_map_ok.rs" "--edition" "2021"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/lines_filter_map_ok.stderr` to the actual output
--- tests/ui/lines_filter_map_ok.stderr
+error: sub-expression diverges
+  --> tests/ui/lines_filter_map_ok.rs:7:37
+   |
+LL |     let f = std::fs::File::open("/")?;
+LL |     let f = std::fs::File::open("/")?;
+   |                                     ^
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
 error: `filter_map()` will run forever if the iterator repeatedly produces an `Err`
... 10 lines skipped ...
    = help: to override `-D warnings` add `#[allow(clippy::lines_filter_map_ok)]`
 
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/lines_filter_map_ok.rs:11:37
+   |
+LL |     let f = std::fs::File::open("/")?;
+   |                                     ^
+
 error: `flat_map()` will run forever if the iterator repeatedly produces an `Err`
... 8 lines skipped ...
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/lines_filter_map_ok.rs:14:37
+   |
+LL |     let f = std::fs::File::open("/")?;
+   |                                     ^
+
 error: `flatten()` will run forever if the iterator repeatedly produces an `Err`
... 44 lines skipped ...
    |     ^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 6 previous errors
---
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`

error: `filter_map()` will run forever if the iterator repeatedly produces an `Err`
   |
   |
LL |     BufReader::new(f).lines().filter_map(Result::ok).for_each(|_| ());
   |                               ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `map_while(Result::ok)`
   |
note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error
   |
   |
LL |     BufReader::new(f).lines().filter_map(Result::ok).for_each(|_| ());
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: `-D clippy::lines-filter-map-ok` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::lines_filter_map_ok)]`
error: sub-expression diverges
##[error]  --> tests/ui/lines_filter_map_ok.rs:11:37
   |
LL |     let f = std::fs::File::open("/")?;
LL |     let f = std::fs::File::open("/")?;
   |                                     ^

error: `flat_map()` will run forever if the iterator repeatedly produces an `Err`
   |
   |
LL |     BufReader::new(f).lines().flat_map(Result::ok).for_each(|_| ());
   |                               ^^^^^^^^^^^^^^^^^^^^ help: replace with: `map_while(Result::ok)`
   |
note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error
   |
   |
LL |     BufReader::new(f).lines().flat_map(Result::ok).for_each(|_| ());

error: sub-expression diverges
##[error]  --> tests/ui/lines_filter_map_ok.rs:14:37
   |
   |
LL |     let f = std::fs::File::open("/")?;
   |                                     ^

error: `flatten()` will run forever if the iterator repeatedly produces an `Err`
   |
   |
LL |     BufReader::new(f).lines().flatten().for_each(|_| ());
   |                               ^^^^^^^^^ help: replace with: `map_while(Result::ok)`
   |
note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error
   |
   |
LL |     BufReader::new(f).lines().flatten().for_each(|_| ());


error: `filter_map()` will run forever if the iterator repeatedly produces an `Err`
   |
   |
LL |     io::stdin().lines().filter_map(Result::ok).for_each(|_| ());
   |                         ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `map_while(Result::ok)`
   |
note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error
   |
   |
LL |     io::stdin().lines().filter_map(Result::ok).for_each(|_| ());


error: `filter_map()` will run forever if the iterator repeatedly produces an `Err`
   |
   |
LL |     io::stdin().lines().filter_map(|x| x.ok()).for_each(|_| ());
   |                         ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `map_while(Result::ok)`
   |
note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error
   |
   |
LL |     io::stdin().lines().filter_map(|x| x.ok()).for_each(|_| ());


error: `flatten()` will run forever if the iterator repeatedly produces an `Err`
   |
   |
LL |     io::stdin().lines().flatten().for_each(|_| ());
   |                         ^^^^^^^^^ help: replace with: `map_while(Result::ok)`
   |
note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error
   |
   |
LL |     io::stdin().lines().flatten().for_each(|_| ());

error: aborting due to 9 previous errors



full stdout:



FAILED TEST: tests/ui/manual_float_methods.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/manual_float_methods.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/manual_rem_euclid.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/manual_rem_euclid.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/manual_slice_size_calculation.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/manual_slice_size_calculation.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/manual_let_else_question_mark.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/manual_let_else_question_mark.fixed" "--edition" "2021" "--crate-name" "manual_let_else_question_mark"
error: rustfix failed with exit status: 1

full stderr:
error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/manual_let_else_question_mark.fixed:29:16
   |
LL |     let v = g()?;
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: sub-expression diverges
##[error]  --> tests/ui/manual_let_else_question_mark.fixed:35:21
   |
LL |     let (v, w) = g()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_let_else_question_mark.fixed:38:16
   |
   |
LL |     let v = g()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_let_else_question_mark.fixed:66:14
   |
---



FAILED TEST: tests/ui/manual_map_option.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/manual_map_option.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/manual_map_option.stderr` to the actual output
--- tests/ui/manual_map_option.stderr
+++ <stderr output>
+++ <stderr output>
 error: manual implementation of `Option::map`
   --> tests/ui/manual_map_option.rs:14:5
... 153 lines skipped ...
    | |_____^ help: try: `Some((String::new(), "test")).as_ref().map(|(x, y)| (y, x))`
+error: sub-expression diverges
+  --> tests/ui/manual_map_option.rs:133:30
+   |
+   |
+LL |             Some(x) => Some(x?),
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
+
 error: manual implementation of `Option::map`
   --> tests/ui/manual_map_option.rs:168:5
... 36 lines skipped ...
    | |_____^ help: try: `{ Some(0).map(|x| x + 1) }`
-error: aborting due to 21 previous errors
+error: aborting due to 22 previous errors
 



full stderr:
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:14:5
   |
LL | /     match Some(0) {
LL | |         Some(_) => Some(2),
LL | |         None::<u32> => None,
LL | |     };
   | |_____^ help: try: `Some(0).map(|_| 2)`
   = note: `-D clippy::manual-map` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::manual_map)]`

error: manual implementation of `Option::map`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:19:5
   |
LL | /     match Some(0) {
LL | |         Some(x) => Some(x + 1),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some(0).map(|x| x + 1)`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:24:5
   |
LL | /     match Some("") {
LL | /     match Some("") {
LL | |         Some(x) => Some(x.is_empty()),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some("").map(|x| x.is_empty())`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:29:5
   |
LL | /     if let Some(x) = Some(0) {
LL | /     if let Some(x) = Some(0) {
LL | |         Some(!x)
LL | |     } else {
LL | |         None
LL | |     };
   | |_____^ help: try: `Some(0).map(|x| !x)`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:36:5
   |
LL | /     match Some(0) {
LL | /     match Some(0) {
LL | |         Some(x) => { Some(std::convert::identity(x)) }
LL | |         None => { None }
LL | |     };
   | |_____^ help: try: `Some(0).map(std::convert::identity)`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:41:5
   |
LL | /     match Some(&String::new()) {
LL | /     match Some(&String::new()) {
LL | |         Some(x) => Some(str::len(x)),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some(&String::new()).map(|x| str::len(x))`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:51:5
   |
   |
LL | /     match &Some([0, 1]) {
LL | |         Some(x) => Some(x[0]),
LL | |         &None => None,
LL | |     };
   | |_____^ help: try: `Some([0, 1]).as_ref().map(|x| x[0])`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:56:5
   |
LL | /     match &Some(0) {
LL | /     match &Some(0) {
LL | |         &Some(x) => Some(x * 2),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some(0).map(|x| x * 2)`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:61:5
   |
LL | /     match Some(String::new()) {
LL | /     match Some(String::new()) {
LL | |         Some(ref x) => Some(x.is_empty()),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some(String::new()).as_ref().map(|x| x.is_empty())`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:66:5
   |
   |
LL | /     match &&Some(String::new()) {
LL | |         Some(x) => Some(x.len()),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some(String::new()).as_ref().map(|x| x.len())`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:71:5
   |
LL | /     match &&Some(0) {
LL | /     match &&Some(0) {
LL | |         &&Some(x) => Some(x + x),
LL | |         &&_ => None,
LL | |     };
   | |_____^ help: try: `Some(0).map(|x| x + x)`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:84:9
   |
LL | /         match &mut Some(String::new()) {
LL | /         match &mut Some(String::new()) {
LL | |             Some(x) => Some(x.push_str("")),
LL | |         };
LL | |         };
   | |_________^ help: try: `Some(String::new()).as_mut().map(|x| x.push_str(""))`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:90:5
   |
LL | /     match &mut Some(String::new()) {
LL | /     match &mut Some(String::new()) {
LL | |         Some(ref x) => Some(x.len()),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some(String::new()).as_ref().map(|x| x.len())`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:95:5
   |
   |
LL | /     match &mut &Some(String::new()) {
LL | |         Some(x) => Some(x.is_empty()),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some(String::new()).as_ref().map(|x| x.is_empty())`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:100:5
   |
   |
LL | /     match Some((0, 1, 2)) {
LL | |         Some((x, y, z)) => Some(x + y + z),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some((0, 1, 2)).map(|(x, y, z)| x + y + z)`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:105:5
   |
   |
LL | /     match Some([1, 2, 3]) {
LL | |         Some([first, ..]) => Some(first),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some([1, 2, 3]).map(|[first, ..]| first)`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:110:5
   |
   |
LL | /     match &Some((String::new(), "test")) {
LL | |         Some((x, y)) => Some((y, x)),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some((String::new(), "test")).as_ref().map(|(x, y)| (y, x))`
error: sub-expression diverges
##[error]  --> tests/ui/manual_map_option.rs:133:30
   |
   |
LL |             Some(x) => Some(x?),
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:168:5
   |
LL | /     match Some(0) {
LL | |         Some(x) => Some(vec![x]),
LL | |     };
LL | |     };
   | |_____^ help: try: `Some(0).map(|x| vec![x])`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:173:5
   |
LL | /     match option_env!("") {
LL | /     match option_env!("") {
LL | |         Some(x) => Some(String::from(x)),
LL | |     };
LL | |     };
   | |_____^ help: try: `option_env!("").map(String::from)`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:193:12
   |
LL |       } else if let Some(x) = Some(0) {
LL |       } else if let Some(x) = Some(0) {
   |  ____________^
LL | |         Some(x + 1)
LL | |     } else {
LL | |         None
LL | |     };
   | |_____^ help: try: `{ Some(0).map(|x| x + 1) }`
error: manual implementation of `Option::map`
##[error]  --> tests/ui/manual_map_option.rs:201:12
   |
LL |       } else if let Some(x) = Some(0) {
LL |       } else if let Some(x) = Some(0) {
   |  ____________^
LL | |         Some(x + 1)
LL | |     } else {
LL | |         None
LL | |     };
   | |_____^ help: try: `{ Some(0).map(|x| x + 1) }`
error: aborting due to 22 previous errors


full stdout:
full stdout:



FAILED TEST: tests/ui/manual_try_fold.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/manual_try_fold.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/manual_split_once.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/manual_split_once.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/manual_split_once.stderr` to the actual output
--- tests/ui/manual_split_once.stderr
+++ <stderr output>
+++ <stderr output>
 error: manual implementation of `split_once`
... 35 lines skipped ...
... 35 lines skipped ...
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=').unwrap().1`
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:25:40
+   |
+   |
+LL |         let _ = s.splitn(2, '=').nth(1)?;
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
+
 error: manual implementation of `split_once`
... 2 lines skipped ...
... 2 lines skipped ...
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=')?.1`
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:26:48
+   |
+   |
+LL |         let _ = s.splitn(2, '=').skip(1).next()?;
+
+
 error: manual implementation of `split_once`
... 2 lines skipped ...
... 2 lines skipped ...
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=')?.1`
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:27:41
+   |
+   |
+LL |         let _ = s.rsplitn(2, '=').nth(1)?;
+
+
 error: manual implementation of `rsplit_once`
... 2 lines skipped ...
... 2 lines skipped ...
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.rsplit_once('=')?.0`
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:28:49
+   |
+   |
+LL |         let _ = s.rsplitn(2, '=').skip(1).next()?;
+
+
 error: manual implementation of `rsplit_once`
... 70 lines skipped ...
    |
 
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:47:24
+   |
+LL |     let l = iter.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:48:24
+   |
+   |
+LL |     let r = iter.next()?;
+   |                        ^
+
 error: manual implementation of `rsplit_once`
... 46 lines skipped ...
    |
 
+error: sub-expression diverges
---
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:56:24
+   |
+LL |     let l = iter.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:62:24
+   |
+   |
+LL |     let l = iter.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:63:24
+   |
+   |
+LL |     let r = iter.next()?;
+   |                        ^
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:66:38
+   |
+LL |     let mut mut_binding = iter.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:67:24
+   |
+   |
+LL |     let r = iter.next()?;
+   |                        ^
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:70:29
+   |
+LL |     let tuple = (iter.next()?, iter.next()?);
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:70:43
+   |
+   |
+LL |     let tuple = (iter.next()?, iter.next()?);
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:80:43
+   |
+   |
+LL |     let question_mark = mixed_unrap.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:83:32
+   |
---
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:88:39
+   |
+LL |     let shadows_existing = iter.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:89:24
+   |
+   |
+LL |     let r = iter.next()?;
+   |                        ^
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:92:39
+   |
+LL |     let becomes_shadowed = iter.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:94:24
+   |
+   |
+LL |     let r = iter.next()?;
+   |                        ^
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:97:24
+   |
+LL |     let l = iter.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:98:24
+   |
---
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:102:27
+   |
+LL |     let l = n_three.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:103:27
+   |
+   |
+LL |     let r = n_three.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:107:35
+   |
---
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:112:33
+   |
+LL |     let _ = lacks_binding.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:113:33
+   |
+   |
+LL |     let r = lacks_binding.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:116:24
+   |
+   |
+LL |     let l = iter.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:117:24
+   |
+   |
+LL |     let r = iter.next()?;
+   |                        ^
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:121:24
+   |
+LL |     let l = iter.next()?;
+
+error: sub-expression diverges
+  --> tests/ui/manual_split_once.rs:122:27
+   |
+   |
+LL |     assigned = iter.next()?;
+   |                           ^
+
 error: manual implementation of `split_once`
... 27 lines skipped ...
    |
 
-error: aborting due to 19 previous errors
-error: aborting due to 19 previous errors
+error: aborting due to 53 previous errors
 


full stderr:
error: manual implementation of `split_once`
   |
   |
LL |     let _ = "key=value".splitn(2, '=').nth(1).unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=').unwrap().1`
   = note: `-D clippy::manual-split-once` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::manual_split_once)]`


error: manual implementation of `split_once`
   |
   |
LL |     let _ = "key=value".splitn(2, '=').skip(1).next().unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=').unwrap().1`

error: manual implementation of `split_once`
   |
   |
LL |     let (_, _) = "key=value".splitn(2, '=').next_tuple().unwrap();
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=')`

error: manual implementation of `split_once`
   |
   |
LL |     let _ = s.splitn(2, '=').nth(1).unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=').unwrap().1`

error: manual implementation of `split_once`
   |
   |
LL |     let _ = s.splitn(2, '=').nth(1).unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=').unwrap().1`

error: manual implementation of `split_once`
   |
   |
LL |     let _ = s.splitn(2, '=').skip(1).next().unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=').unwrap().1`
error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:25:40
   |
   |
LL |         let _ = s.splitn(2, '=').nth(1)?;
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: manual implementation of `split_once`
   |
   |
LL |         let _ = s.splitn(2, '=').nth(1)?;
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=')?.1`
error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:26:48
   |
   |
LL |         let _ = s.splitn(2, '=').skip(1).next()?;


error: manual implementation of `split_once`
   |
   |
LL |         let _ = s.splitn(2, '=').skip(1).next()?;
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=')?.1`
error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:27:41
   |
   |
LL |         let _ = s.rsplitn(2, '=').nth(1)?;


error: manual implementation of `rsplit_once`
   |
   |
LL |         let _ = s.rsplitn(2, '=').nth(1)?;
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.rsplit_once('=')?.0`
error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:28:49
   |
   |
LL |         let _ = s.rsplitn(2, '=').skip(1).next()?;


error: manual implementation of `rsplit_once`
   |
   |
LL |         let _ = s.rsplitn(2, '=').skip(1).next()?;
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.rsplit_once('=')?.0`

error: manual implementation of `rsplit_once`
   |
   |
LL |     let _ = "key=value".rsplitn(2, '=').nth(1).unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".rsplit_once('=').unwrap().0`

error: manual implementation of `rsplit_once`
   |
   |
LL |     let (_, _) = "key=value".rsplitn(2, '=').next_tuple().unwrap();
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".rsplit_once('=').map(|(x, y)| (y, x))`

error: manual implementation of `rsplit_once`
   |
   |
LL |     let _ = s.rsplitn(2, '=').nth(1);
   |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.rsplit_once('=').map(|x| x.0)`

error: manual implementation of `split_once`
   |
   |
LL |     let mut iter = "a.b.c".splitn(2, '.');
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |     let l = iter.next().unwrap();
LL |     let r = iter.next().unwrap();
   |     ----------------------------- second usage here
   |
help: try `split_once`
help: try `split_once`
   |
LL |     let (l, r) = "a.b.c".split_once('.').unwrap();
help: remove the `iter` usages
   |
   |
LL -     let l = iter.next().unwrap();
LL +     
help: remove the `iter` usages
   |
LL -     let r = iter.next().unwrap();
LL +     
LL +     
   |

error: manual implementation of `split_once`
   |
   |
LL |     let mut iter = "a.b.c".splitn(2, '.');
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |     let l = iter.next()?;
LL |     let r = iter.next()?;
   |     --------------------- second usage here
   |
help: try `split_once`
help: try `split_once`
   |
LL |     let (l, r) = "a.b.c".split_once('.')?;
help: remove the `iter` usages
   |
   |
LL -     let l = iter.next()?;
LL +     
help: remove the `iter` usages
   |
LL -     let r = iter.next()?;
LL +     
LL +     
   |

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:47:24
   |
LL |     let l = iter.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:48:24
   |
   |
LL |     let r = iter.next()?;
   |                        ^

error: manual implementation of `rsplit_once`
   |
   |
LL |     let mut iter = "a.b.c".rsplitn(2, '.');
LL |     let r = iter.next().unwrap();
   |     ----------------------------- first usage here
   |     ----------------------------- first usage here
LL |     let l = iter.next().unwrap();
   |     ----------------------------- second usage here
help: try `rsplit_once`
   |
   |
LL |     let (l, r) = "a.b.c".rsplit_once('.').unwrap();
help: remove the `iter` usages
   |
LL -     let r = iter.next().unwrap();
LL +     
LL +     
   |
help: remove the `iter` usages
   |
LL -     let l = iter.next().unwrap();
LL +     


error: manual implementation of `rsplit_once`
   |
   |
LL |     let mut iter = "a.b.c".rsplitn(2, '.');
LL |     let r = iter.next()?;
   |     --------------------- first usage here
   |     --------------------- first usage here
LL |     let l = iter.next()?;
   |     --------------------- second usage here
help: try `rsplit_once`
   |
   |
LL |     let (l, r) = "a.b.c".rsplit_once('.')?;
help: remove the `iter` usages
   |
LL -     let r = iter.next()?;
LL +     
LL +     
   |
help: remove the `iter` usages
   |
LL -     let l = iter.next()?;
LL +     

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:55:24
   |
   |
LL |     let r = iter.next()?;
   |                        ^

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:56:24
   |
LL |     let l = iter.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:62:24
   |
   |
LL |     let l = iter.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:63:24
   |
   |
LL |     let r = iter.next()?;
   |                        ^

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:66:38
   |
LL |     let mut mut_binding = iter.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:67:24
   |
   |
LL |     let r = iter.next()?;
   |                        ^

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:70:29
   |
LL |     let tuple = (iter.next()?, iter.next()?);

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:70:43
   |
   |
LL |     let tuple = (iter.next()?, iter.next()?);

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:80:43
   |
   |
LL |     let question_mark = mixed_unrap.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:83:32
   |
---

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:88:39
   |
LL |     let shadows_existing = iter.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:89:24
   |
   |
LL |     let r = iter.next()?;
   |                        ^

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:92:39
   |
LL |     let becomes_shadowed = iter.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:94:24
   |
   |
LL |     let r = iter.next()?;
   |                        ^

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:97:24
   |
LL |     let l = iter.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:98:24
   |
---

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:102:27
   |
LL |     let l = n_three.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:103:27
   |
   |
LL |     let r = n_three.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:107:35
   |
---

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:112:33
   |
LL |     let _ = lacks_binding.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:113:33
   |
   |
LL |     let r = lacks_binding.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:116:24
   |
   |
LL |     let l = iter.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:117:24
   |
   |
LL |     let r = iter.next()?;
   |                        ^

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:121:24
   |
LL |     let l = iter.next()?;

error: sub-expression diverges
##[error]  --> tests/ui/manual_split_once.rs:122:27
   |
   |
LL |     assigned = iter.next()?;
   |                           ^

error: manual implementation of `split_once`
   |
   |
LL |     let _ = "key=value".splitn(2, '=').nth(1).unwrap();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=').unwrap().1`

error: manual implementation of `split_once`
   |
   |
LL |     let mut iter = "a.b.c".splitn(2, '.');
LL |     let a = iter.next().unwrap();
   |     ----------------------------- first usage here
LL |     let b = iter.next().unwrap();
   |     ----------------------------- second usage here
   |     ----------------------------- second usage here
   |
help: try `split_once`
   |
LL |     let (a, b) = "a.b.c".split_once('.').unwrap();
help: remove the `iter` usages
   |
   |
LL -     let a = iter.next().unwrap();
LL +     
help: remove the `iter` usages
   |
   |
LL -     let b = iter.next().unwrap();
LL +     

error: aborting due to 53 previous errors



full stdout:



FAILED TEST: tests/ui/mem_replace_macro.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/mem_replace_macro.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/min_ident_chars.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/min_ident_chars.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/missing_doc.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/missing_doc.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/missing_doc_impl.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/missing_doc_impl.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/mistyped_literal_suffix.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/mistyped_literal_suffix.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/multiple_unsafe_ops_per_block.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/multiple_unsafe_ops_per_block.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/must_use_unit.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/must_use_unit.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/mut_mut.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/mut_mut.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/needless_arbitrary_self_type_unfixable.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macro_attr.rs\" }"
error: aux build from tests/ui/needless_arbitrary_self_type_unfixable.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/needless_if.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/needless_if.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/needless_late_init.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/needless_late_init.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/needless_lifetimes.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/needless_lifetimes.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/needless_pub_self.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/needless_pub_self.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/needless_return_with_question_mark.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/needless_return_with_question_mark.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/needless_question_mark.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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_question_mark.rs" "--edition" "2021"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/needless_question_mark.stderr` to the actual output
--- tests/ui/needless_question_mark.stderr
+error: sub-expression diverges
+  --> tests/ui/needless_question_mark.rs:20:25
+   |
+   |
+LL |     return Some(to.magic?);
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
+
 error: question mark operator is useless here
... 29 lines skipped ...
... 29 lines skipped ...
    |         ^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `t.magic`
+error: sub-expression diverges
+  --> tests/ui/needless_question_mark.rs:52:23
+   |
+   |
+LL |     return Ok(tr.magic?);
+
+
 error: question mark operator is useless here
... 26 lines skipped ...
... 26 lines skipped ...
    |         ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`
+error: sub-expression diverges
+  --> tests/ui/needless_question_mark.rs:82:26
+   |
+   |
+LL |         return Ok(t.magic?);
+
+
 error: question mark operator is useless here
... 31 lines skipped ...
... 31 lines skipped ...
    |       ^^^^^^^^ help: try removing question mark and `Some()`: `a`
-error: aborting due to 15 previous errors
+error: aborting due to 18 previous errors
 



full stderr:
error: sub-expression diverges
##[error]  --> tests/ui/needless_question_mark.rs:20:25
   |
LL |     return Some(to.magic?);
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: question mark operator is useless here
   |
   |
LL |     return Some(to.magic?);
   |            ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`
   = note: `-D clippy::needless-question-mark` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_question_mark)]`


error: question mark operator is useless here
   |
   |
LL |     return Some(to.magic?)
   |            ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`

error: question mark operator is useless here
   |
   |
LL |     Some(to.magic?)
   |     ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`

error: question mark operator is useless here
   |
   |
LL |     to.and_then(|t| Some(t.magic?))
   |                     ^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `t.magic`

error: question mark operator is useless here
   |
   |
LL |         Some(t.magic?)
   |         ^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `t.magic`
error: sub-expression diverges
##[error]  --> tests/ui/needless_question_mark.rs:52:23
   |
   |
LL |     return Ok(tr.magic?);


error: question mark operator is useless here
   |
   |
LL |     return Ok(tr.magic?);
   |            ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`

error: question mark operator is useless here
   |
   |
LL |     return Ok(tr.magic?)
   |            ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`

error: question mark operator is useless here
   |
   |
LL |     Ok(tr.magic?)
   |     ^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `tr.magic`

error: question mark operator is useless here
   |
   |
LL |     tr.and_then(|t| Ok(t.magic?))
   |                     ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`

error: question mark operator is useless here
   |
   |
LL |         Ok(t.magic?)
   |         ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`
error: sub-expression diverges
##[error]  --> tests/ui/needless_question_mark.rs:82:26
   |
   |
LL |         return Ok(t.magic?);


error: question mark operator is useless here
   |
   |
LL |         return Ok(t.magic?);
   |                ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `t.magic`

error: question mark operator is useless here
   |
   |
LL |         || -> Option<_> { Some(Some($expr)?) }()
   |                           ^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `Some($expr)`
...
LL |     let _x = some_and_qmark_in_macro!(x?);
   |
   = note: this error originates in the macro `some_and_qmark_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)


error: question mark operator is useless here
   |
   |
LL |     Some(to.magic?)
   |     ^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `to.magic`

error: question mark operator is useless here
   |
   |
LL |     Ok(s.magic?)
   |     ^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `s.magic`

error: question mark operator is useless here
   |
   |
LL |     { Some(a?) }
   |       ^^^^^^^^ help: try removing question mark and `Some()`: `a`
error: aborting due to 18 previous errors


full stdout:
full stdout:



FAILED TEST: tests/ui/needless_splitn.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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_splitn.rs" "--edition" "2018"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/needless_splitn.stderr` to the actual output
--- tests/ui/needless_splitn.stderr
 error: unnecessary use of `splitn`
   --> tests/ui/needless_splitn.rs:13:13
... 47 lines skipped ...
... 47 lines skipped ...
    |             ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
+error: sub-expression diverges
+  --> tests/ui/needless_splitn.rs:33:36
+   |
+   |
+LL |     let _ = s.splitn(2, '=').next()?;
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
+
 error: unnecessary use of `splitn`
   --> tests/ui/needless_splitn.rs:33:13
... 2 lines skipped ...
    |             ^^^^^^^^^^^^^^^^ help: try: `s.split('=')`
+error: sub-expression diverges
+  --> tests/ui/needless_splitn.rs:34:36
+   |
+   |
+LL |     let _ = s.splitn(2, '=').nth(0)?;
+
 error: unnecessary use of `splitn`
   --> tests/ui/needless_splitn.rs:34:13
... 2 lines skipped ...
... 2 lines skipped ...
    |             ^^^^^^^^^^^^^^^^ help: try: `s.split('=')`
+error: sub-expression diverges
+  --> tests/ui/needless_splitn.rs:35:37
+   |
+   |
+LL |     let _ = s.rsplitn(2, '=').next()?;
+
 error: unnecessary use of `rsplitn`
   --> tests/ui/needless_splitn.rs:35:13
... 2 lines skipped ...
... 2 lines skipped ...
    |             ^^^^^^^^^^^^^^^^^ help: try: `s.rsplit('=')`
+error: sub-expression diverges
+  --> tests/ui/needless_splitn.rs:36:37
+   |
+   |
+LL |     let _ = s.rsplitn(2, '=').nth(0)?;
+
 error: unnecessary use of `rsplitn`
   --> tests/ui/needless_splitn.rs:36:13
... 8 lines skipped ...
... 8 lines skipped ...
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split('=')`
-error: aborting due to 13 previous errors
+error: aborting due to 17 previous errors
 



full stderr:
error: unnecessary use of `splitn`
##[error]  --> tests/ui/needless_splitn.rs:13:13
   |
LL |     let _ = str.splitn(2, '=').next();
   |             ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
   |
   = note: `-D clippy::needless-splitn` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_splitn)]`
error: unnecessary use of `splitn`
##[error]  --> tests/ui/needless_splitn.rs:14:13
   |
   |
LL |     let _ = str.splitn(2, '=').nth(0);
   |             ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
error: unnecessary use of `splitn`
##[error]  --> tests/ui/needless_splitn.rs:17:18
   |
   |
LL |     let (_, _) = str.splitn(3, '=').next_tuple().unwrap();
   |                  ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
error: unnecessary use of `rsplitn`
##[error]  --> tests/ui/needless_splitn.rs:20:13
   |
   |
LL |     let _ = str.rsplitn(2, '=').next();
   |             ^^^^^^^^^^^^^^^^^^^ help: try: `str.rsplit('=')`
error: unnecessary use of `rsplitn`
##[error]  --> tests/ui/needless_splitn.rs:21:13
   |
   |
LL |     let _ = str.rsplitn(2, '=').nth(0);
---
-error: this loop never actually loops
+For more information about this error, try `rustc --explain E0282`.


error: `this loop never actually loops` not found in diagnostics on line 12
   |
   |
13 |         //~^ ERROR: this loop never actually loops
   |


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
   |
   |
37 |         //~^ ERROR: this loop never actually loops
   |


error: `this loop never actually loops` not found in diagnostics on line 57
   |
   |
58 |         //~^ ERROR: this loop never actually loops
   |


error: `this loop never actually loops` not found in diagnostics on line 60
   |
   |
61 |             //~^ ERROR: this loop never actually loops
   |


error: `this loop never actually loops` not found in diagnostics on line 73
   |
   |
74 |             //~^ ERROR: this loop never actually loops
   |


error: `this loop never actually loops` not found in diagnostics on line 110
    |
    |
111 |         //~^ ERROR: this loop never actually loops
    |


error: `this loop never actually loops` not found in diagnostics on line 118
    |
    |
119 |         //~^ ERROR: this loop never actually loops
    |


error: `this loop never actually loops` not found in diagnostics on line 167
    |
    |
168 |         //~^ ERROR: this loop never actually loops
    |


error: `this loop never actually loops` not found in diagnostics on line 183
    |
    |
184 |             //~^ ERROR: this loop never actually loops
    |


error: `this loop never actually loops` not found in diagnostics on line 235
    |
    |
236 |         //~^ ERROR: this loop never actually loops
    |


error: `this loop never actually loops` not found in diagnostics on line 257
    |
    |
258 |         //~^ ERROR: this loop never actually loops
    |


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


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
    |
    |
295 |                 //~^ ERROR: this loop never actually loops
    |


error: `this loop never actually loops` not found in diagnostics on line 378
    |
    |
379 |                 //~^ ERROR: this loop never actually loops
    |


error: `this loop never actually loops` not found in diagnostics on line 389
    |
    |
390 |         //~^ ERROR: this loop never actually loops
    |


error: `this loop never actually loops` not found in diagnostics on line 393
    |
    |
394 |         //~^ ERROR: this loop never actually loops
    |

full stderr:
error[E0282]: type annotations needed
---



FAILED TEST: tests/ui/option_env_unwrap.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/option_env_unwrap.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/patterns.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/patterns.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/option_option.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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_option.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/option_option.stderr` to the actual output
--- tests/ui/option_option.stderr
+++ <stderr output>
+++ <stderr output>
 error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
... 74 lines skipped ...
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 12 previous errors
---
+


full stderr:
error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
   |
LL | const C: Option<Option<i32>> = None;
   |
note: the lint level is defined here
  --> tests/ui/option_option.rs:1:9
   |
   |
LL | #![deny(clippy::option_option)]
   |         ^^^^^^^^^^^^^^^^^^^^^

error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
   |
LL | static S: Option<Option<i32>> = None;


error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
   |
LL | fn input(_: Option<Option<u8>>) {}


error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
LL | fn output() -> Option<Option<u8>> {
   |                ^^^^^^^^^^^^^^^^^^


error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
   |
LL | fn output_nested() -> Vec<Option<Option<u8>>> {


error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
LL | fn output_nested_nested() -> Option<Option<Option<u8>>> {
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^


error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
LL |     x: Option<Option<u8>>,
   |        ^^^^^^^^^^^^^^^^^^


error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
LL |     fn struct_fn() -> Option<Option<u8>> {
   |                       ^^^^^^^^^^^^^^^^^^


error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
LL |     fn trait_fn() -> Option<Option<u8>>;
   |                      ^^^^^^^^^^^^^^^^^^


error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
   |
LL |     Tuple(Option<Option<u8>>),


error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
   |
LL |     Struct { x: Option<Option<u8>> },


error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
   |
   |
LL |         foo: Option<Option<Cow<'a, str>>>,

error: sub-expression diverges
##[error]  --> tests/ui/option_option.rs:84:22
   |
---



FAILED TEST: tests/ui/or_fun_call.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/or_fun_call.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/or_fun_call.stderr` to the actual output
--- tests/ui/or_fun_call.stderr
+++ <stderr output>
+++ <stderr output>
 error: use of `unwrap_or` followed by a function call
   --> tests/ui/or_fun_call.rs:52:22
... 116 lines skipped ...
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_else(|| Some("b".to_string()))`
+error: sub-expression diverges
+  --> tests/ui/or_fun_call.rs:155:41
+   |
+   |
+LL |     let _ = a.unwrap_or(b.checked_mul(3)?.min(240));
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
---
full stderr:
error: use of `unwrap_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:52:22
   |
LL |     with_constructor.unwrap_or(make());
   |                      ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(make)`
   = note: `-D clippy::or-fun-call` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::or_fun_call)]`

error: use of `unwrap_or` to construct default value
error: use of `unwrap_or` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:55:14
   |
LL |     with_new.unwrap_or(Vec::new());
   |              ^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
   = note: `-D clippy::unwrap-or-default` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::unwrap_or_default)]`

error: use of `unwrap_or` followed by a function call
---
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: test failed, to rerun pass `--test compile-test`
Build completed unsuccessfully in 0:01:47
   |
LL |     with_const_args.unwrap_or(Vec::with_capacity(12));
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| Vec::with_capacity(12))`
error: use of `unwrap_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:61:14
   |
   |
LL |     with_err.unwrap_or(make());
   |              ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| make())`
error: use of `unwrap_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:64:19
   |
   |
LL |     with_err_args.unwrap_or(Vec::with_capacity(12));
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| Vec::with_capacity(12))`
error: use of `unwrap_or` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:67:24
   |
   |
LL |     with_default_trait.unwrap_or(Default::default());
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
error: use of `unwrap_or` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:70:23
   |
   |
LL |     with_default_type.unwrap_or(u64::default());
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
error: use of `unwrap_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:73:18
   |
   |
LL |     self_default.unwrap_or(<FakeDefault>::default());
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(<FakeDefault>::default)`
error: use of `unwrap_or` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:76:18
   |
   |
LL |     real_default.unwrap_or(<FakeDefault as Default>::default());
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
error: use of `unwrap_or` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:79:14
   |
   |
LL |     with_vec.unwrap_or(vec![]);
   |              ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
error: use of `unwrap_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:82:21
   |
   |
LL |     without_default.unwrap_or(Foo::new());
   |                     ^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(Foo::new)`
error: use of `or_insert` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:85:19
   |
   |
LL |     map.entry(42).or_insert(String::new());
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
error: use of `or_insert` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:88:23
   |
   |
LL |     map_vec.entry(42).or_insert(vec![]);
   |                       ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
error: use of `or_insert` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:91:21
   |
   |
LL |     btree.entry(42).or_insert(String::new());
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
error: use of `or_insert` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:94:25
   |
   |
LL |     btree_vec.entry(42).or_insert(vec![]);
   |                         ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
error: use of `unwrap_or` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:97:21
   |
LL |     let _ = stringy.unwrap_or(String::new());
LL |     let _ = stringy.unwrap_or(String::new());
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:105:21
   |
LL |     let _ = Some(1).unwrap_or(map[&1]);
   |                     ^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| map[&1])`
error: use of `unwrap_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:107:21
   |
   |
LL |     let _ = Some(1).unwrap_or(map[&1]);
   |                     ^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| map[&1])`
error: use of `or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:131:35
   |
   |
LL |     let _ = Some("a".to_string()).or(Some("b".to_string()));
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_else(|| Some("b".to_string()))`
error: sub-expression diverges
##[error]  --> tests/ui/or_fun_call.rs:155:41
   |
   |
LL |     let _ = a.unwrap_or(b.checked_mul(3)?.min(240));
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: use of `unwrap_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:170:14
   |
LL |         None.unwrap_or(ptr_to_ref(s));
   |              ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| ptr_to_ref(s))`
error: use of `unwrap_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:176:14
   |
   |
LL |         None.unwrap_or(unsafe { ptr_to_ref(s) });
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| unsafe { ptr_to_ref(s) })`
error: use of `unwrap_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:178:14
   |
   |
LL |         None.unwrap_or( unsafe { ptr_to_ref(s) }    );
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| unsafe { ptr_to_ref(s) })`
error: use of `map_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:253:25
   |
   |
LL |         let _ = Some(4).map_or(g(), |v| v);
   |                         ^^^^^^^^^^^^^^^^^^ help: try: `map_or_else(g, |v| v)`
error: use of `map_or` followed by a function call
##[error]  --> tests/ui/or_fun_call.rs:254:25
   |
   |
LL |         let _ = Some(4).map_or(g(), f);
   |                         ^^^^^^^^^^^^^^ help: try: `map_or_else(g, f)`
error: use of `unwrap_or_else` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:285:18
   |
   |
LL |         with_new.unwrap_or_else(Vec::new);
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
error: use of `unwrap_or_else` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:288:28
   |
   |
LL |         with_default_trait.unwrap_or_else(Default::default);
   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
error: use of `unwrap_or_else` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:291:27
   |
   |
LL |         with_default_type.unwrap_or_else(u64::default);
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
error: use of `unwrap_or_else` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:294:22
   |
   |
LL |         real_default.unwrap_or_else(<FakeDefault as Default>::default);
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
error: use of `or_insert_with` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:297:23
   |
   |
LL |         map.entry(42).or_insert_with(String::new);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
error: use of `or_insert_with` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:300:25
   |
   |
LL |         btree.entry(42).or_insert_with(String::new);
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
error: use of `unwrap_or_else` to construct default value
##[error]  --> tests/ui/or_fun_call.rs:303:25
   |
   |
LL |         let _ = stringy.unwrap_or_else(String::new);
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
error: aborting due to 32 previous errors


full stdout:
full stdout:



FAILED TEST: tests/ui/ptr_as_ptr.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/ptr_as_ptr.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/ptr_cast_constness.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/ptr_cast_constness.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/pub_with_shorthand.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/pub_with_shorthand.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/pub_without_shorthand.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/pub_without_shorthand.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/question_mark_used.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/question_mark_used.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/question_mark_used.stderr` to the actual output
--- tests/ui/question_mark_used.stderr
+++ <stderr output>
---
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
 error: question mark operator was used
... 6 lines skipped ...
    = help: to override `-D warnings` add `#[allow(clippy::question_mark_used)]`
 
-error: aborting due to 1 previous error
---
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`

error: question mark operator was used
   |
LL |     other_function()?;
   |     ^^^^^^^^^^^^^^^^^
   |
   |
   = help: consider using a custom macro or match expression
   = note: `-D clippy::question-mark-used` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::question_mark_used)]`
error: aborting due to 2 previous errors


full stdout:
full stdout:



FAILED TEST: tests/ui/redundant_at_rest_pattern.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/redundant_at_rest_pattern.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/redundant_field_names.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/redundant_field_names.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/redundant_guards.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/redundant_guards.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/redundant_locals.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/redundant_locals.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/read_zero_byte_vec.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/read_zero_byte_vec.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/read_zero_byte_vec.stderr` to the actual output
--- tests/ui/read_zero_byte_vec.stderr
+++ <stderr output>
---
+
+error: sub-expression diverges
+  --> tests/ui/read_zero_byte_vec.rs:37:31
+   |
+LL |     let _ = f.read(&mut data4)?;
+
 error: reading zero byte data to `Vec`
   --> tests/ui/read_zero_byte_vec.rs:43:9
... 8 lines skipped ...
---
 
+error: sub-expression diverges
+  --> tests/ui/read_zero_byte_vec.rs:79:23
+   |
+LL |         f.read(&mut v)?;
+
+error: sub-expression diverges
+  --> tests/ui/read_zero_byte_vec.rs:84:23
+   |
+   |
+LL |         f.read(&mut v)?;
+
 error: reading zero byte data to `Vec`
   --> tests/ui/read_zero_byte_vec.rs:94:5
... 20 lines skipped ...
---
full stderr:
error: reading zero byte data to `Vec`
##[error]  --> tests/ui/read_zero_byte_vec.rs:21:5
   |
LL |     f.read_exact(&mut data).unwrap();
   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `data.resize(20, 0); f.read_exact(&mut data)`
   |
   = note: `-D clippy::read-zero-byte-vec` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::read_zero_byte_vec)]`
error: reading zero byte data to `Vec`
##[error]  --> tests/ui/read_zero_byte_vec.rs:27:5
   |
LL |     f.read_exact(&mut data2)?;
LL |     f.read_exact(&mut data2)?;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `data2.resize(cap, 0); f.read_exact(&mut data2)`
error: reading zero byte data to `Vec`
##[error]  --> tests/ui/read_zero_byte_vec.rs:32:5
   |
LL |     f.read_exact(&mut data3)?;
LL |     f.read_exact(&mut data3)?;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^

error: reading zero byte data to `Vec`
##[error]  --> tests/ui/read_zero_byte_vec.rs:37:13
   |
LL |     let _ = f.read(&mut data4)?;

error: sub-expression diverges
##[error]  --> tests/ui/read_zero_byte_vec.rs:27:29
   |
---

error: sub-expression diverges
##[error]  --> tests/ui/read_zero_byte_vec.rs:37:31
   |
LL |     let _ = f.read(&mut data4)?;

error: reading zero byte data to `Vec`
##[error]  --> tests/ui/read_zero_byte_vec.rs:43:9
   |
---

error: reading zero byte data to `Vec`
##[error]  --> tests/ui/read_zero_byte_vec.rs:84:9
   |
LL |         f.read(&mut v)?;

error: sub-expression diverges
##[error]  --> tests/ui/read_zero_byte_vec.rs:79:23
   |
   |
LL |         f.read(&mut v)?;

error: sub-expression diverges
##[error]  --> tests/ui/read_zero_byte_vec.rs:84:23
   |
   |
LL |         f.read(&mut v)?;

error: reading zero byte data to `Vec`
##[error]  --> tests/ui/read_zero_byte_vec.rs:94:5
   |
   |
LL |     r.read(&mut data).await.unwrap();

error: reading zero byte data to `Vec`
##[error]  --> tests/ui/read_zero_byte_vec.rs:99:5
   |
   |
LL |     r.read_exact(&mut data2).await.unwrap();

error: reading zero byte data to `Vec`
##[error]  --> tests/ui/read_zero_byte_vec.rs:106:5
   |
   |
LL |     r.read(&mut data).await.unwrap();

error: reading zero byte data to `Vec`
##[error]  --> tests/ui/read_zero_byte_vec.rs:111:5
   |
   |
LL |     r.read_exact(&mut data2).await.unwrap();

error: aborting due to 19 previous errors



full stdout:



FAILED TEST: tests/ui/question_mark.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/question_mark.fixed" "--edition" "2021" "--crate-name" "question_mark"
error: rustfix failed with exit status: 1

full stderr:
error: sub-expression diverges
---

error: sub-expression diverges
##[error]  --> tests/ui/question_mark.fixed:86:43
   |
LL |         let v: &Vec<_> = self.opt.as_ref()?;

error: sub-expression diverges
##[error]  --> tests/ui/question_mark.fixed:92:25
   |
---



FAILED TEST: tests/ui/recursive_format_impl.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/recursive_format_impl.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/recursive_format_impl.stderr` to the actual output
--- tests/ui/recursive_format_impl.stderr
+++ <stderr output>
---
 
+error: sub-expression diverges
+  --> tests/ui/recursive_format_impl.rs:303:44
+   |
+LL |                     write!(f, "{},", child)?;
+
+error: sub-expression diverges
+  --> tests/ui/recursive_format_impl.rs:316:31
+   |
+   |
+LL |                 write!(f, "(")?;
+
+error: sub-expression diverges
+  --> tests/ui/recursive_format_impl.rs:318:46
+   |
+   |
+LL |                     write!(f, "{:?},", child)?;
+
+error: aborting due to 14 previous errors
+

---
   |
   = note: `-D clippy::recursive-format-impl` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::recursive_format_impl)]`

error: using `self` as `Display` in `impl Display` will cause infinite recursion
   |
LL |         write!(f, "{}", self)
   |         ^^^^^^^^^^^^^^^^^^^^^
   |
   |
   = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)

error: using `self` as `Display` in `impl Display` will cause infinite recursion
   |
LL |         write!(f, "{}", &self)
   |         ^^^^^^^^^^^^^^^^^^^^^^
   |
   |
   = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)

error: using `self` as `Debug` in `impl Debug` will cause infinite recursion
   |
LL |         write!(f, "{:?}", &self)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   |
   = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)

error: using `self` as `Display` in `impl Display` will cause infinite recursion
   |
   |
LL |         write!(f, "{}", &&&self)
   |
   = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)


error: using `self` as `Display` in `impl Display` will cause infinite recursion
   |
LL |         write!(f, "{}", &*self)
   |         ^^^^^^^^^^^^^^^^^^^^^^^
   |
   |
   = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)

error: using `self` as `Debug` in `impl Debug` will cause infinite recursion
   |
LL |         write!(f, "{:?}", &*self)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   |
   = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)

error: using `self` as `Display` in `impl Display` will cause infinite recursion
   |
LL |         write!(f, "{}", *self)
   |         ^^^^^^^^^^^^^^^^^^^^^^
   |
   |
   = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)

error: using `self` as `Display` in `impl Display` will cause infinite recursion
   |
   |
LL |         write!(f, "{}", **&&*self)
   |
   = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)


error: using `self` as `Display` in `impl Display` will cause infinite recursion
   |
   |
LL |         write!(f, "{}", &&**&&*self)
   |
   = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)

error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/recursive_format_impl.rs:301:31
   |
LL |                 write!(f, "(")?;
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: sub-expression diverges
##[error]  --> tests/ui/recursive_format_impl.rs:303:44
   |
LL |                     write!(f, "{},", child)?;

error: sub-expression diverges
##[error]  --> tests/ui/recursive_format_impl.rs:316:31
   |
   |
LL |                 write!(f, "(")?;

error: sub-expression diverges
##[error]  --> tests/ui/recursive_format_impl.rs:318:46
   |
   |
LL |                     write!(f, "{:?},", child)?;

error: aborting due to 14 previous errors



full stdout:



FAILED TEST: tests/ui/reserve_after_initialization.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/reserve_after_initialization.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/semicolon_if_nothing_returned.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macro_attr.rs\" }"
error: aux build from tests/ui/semicolon_if_nothing_returned.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/seek_from_current.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/seek_from_current.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/seek_from_current.stderr` to the actual output
--- tests/ui/seek_from_current.stderr
+++ <stderr output>
+++ <stderr output>
+error: sub-expression diverges
+  --> tests/ui/seek_from_current.rs:8:40
+   |
+LL |     let mut f = File::create("foo.txt")?;
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
+
+error: sub-expression diverges
+  --> tests/ui/seek_from_current.rs:9:24
+   |
+LL |     f.write_all(b"Hi!")?;
+
+error: sub-expression diverges
+  --> tests/ui/seek_from_current.rs:10:33
+   |
+   |
+LL |     f.seek(SeekFrom::Current(0))?;
+
+error: sub-expression diverges
+  --> tests/ui/seek_from_current.rs:11:33
+   |
+   |
+LL |     f.seek(SeekFrom::Current(1))?;
+
+error: sub-expression diverges
+  --> tests/ui/seek_from_current.rs:17:40
+   |
+   |
+LL |     let mut f = File::create("foo.txt")?;
+
+error: sub-expression diverges
+  --> tests/ui/seek_from_current.rs:18:24
+   |
+   |
+LL |     f.write_all(b"Hi!")?;
+
+error: sub-expression diverges
+  --> tests/ui/seek_from_current.rs:19:33
+   |
+   |
+LL |     f.seek(SeekFrom::Current(0))?;
+
 error: using `SeekFrom::Current` to start from current position
   --> tests/ui/seek_from_current.rs:19:5
... 5 lines skipped ...
---
full stderr:
error: sub-expression diverges
##[error]  --> tests/ui/seek_from_current.rs:8:40
   |
LL |     let mut f = File::create("foo.txt")?;
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: sub-expression diverges
##[error]  --> tests/ui/seek_from_current.rs:9:24
   |
LL |     f.write_all(b"Hi!")?;

error: sub-expression diverges
##[error]  --> tests/ui/seek_from_current.rs:10:33
   |
   |
LL |     f.seek(SeekFrom::Current(0))?;

error: sub-expression diverges
##[error]  --> tests/ui/seek_from_current.rs:11:33
   |
   |
LL |     f.seek(SeekFrom::Current(1))?;

error: sub-expression diverges
##[error]  --> tests/ui/seek_from_current.rs:17:40
   |
   |
LL |     let mut f = File::create("foo.txt")?;

error: sub-expression diverges
##[error]  --> tests/ui/seek_from_current.rs:18:24
   |
   |
LL |     f.write_all(b"Hi!")?;

error: sub-expression diverges
##[error]  --> tests/ui/seek_from_current.rs:19:33
   |
   |
LL |     f.seek(SeekFrom::Current(0))?;

error: using `SeekFrom::Current` to start from current position
##[error]  --> tests/ui/seek_from_current.rs:19:5
   |
   |
LL |     f.seek(SeekFrom::Current(0))?;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `f.stream_position()`
   |
   = note: `-D clippy::seek-from-current` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::seek_from_current)]`
error: sub-expression diverges
##[error]  --> tests/ui/seek_from_current.rs:20:33
   |
   |
LL |     f.seek(SeekFrom::Current(1))?;

error: aborting due to 9 previous errors



full stdout:



FAILED TEST: tests/ui/single_call_fn.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/single_call_fn.rs:2 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/shadow.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/shadow.rs" "--edition" "2021" "--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"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/shadow.stderr` to the actual output
--- tests/ui/shadow.stderr
+++ <stderr output>
+++ <stderr output>
-error: `x` is shadowed by itself in `x`
-  --> tests/ui/shadow.rs:24:9
+  --> tests/ui/shadow.rs:105:5
    |
-LL |     let x = x;
---
+LL |     None::<T>?;
-   |         ^
+   |         +++++
 
-error: `mut x` is shadowed by itself in `&x`
 
 
-error: `x` is shadowed by itself in `&mut x`


full stderr:
error[E0282]: type annotations needed
---



FAILED TEST: tests/ui/single_match_else.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/single_match_else.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/single_range_in_vec_init.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/single_range_in_vec_init.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/string_add.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/string_add.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/string_lit_chars_any.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/string_lit_chars_any.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/struct_fields.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/struct_fields.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/significant_drop_in_scrutinee.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/significant_drop_in_scrutinee.rs" "--edition" "2021"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/significant_drop_in_scrutinee.stderr` to the actual output
--- tests/ui/significant_drop_in_scrutinee.stderr
+++ <stderr output>
 error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
... 459 lines skipped ...
    |
 
+error: sub-expression diverges
+error: sub-expression diverges
+  --> tests/ui/significant_drop_in_scrutinee.rs:616:55
+   |
+LL |     let result = rwlock.read().unwrap().parse::<u64>()?;
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
+
 error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
... 34 lines skipped ...
    |
 
-error: aborting due to 26 previous errors
-error: aborting due to 26 previous errors
+error: aborting due to 27 previous errors
 


full stderr:
error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match mutex.lock().unwrap().foo() {
...
...
LL |             mutex.lock().unwrap().bar();
   |             --------------------- another value with significant `Drop` created here
LL |     };
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
   = note: `-D clippy::significant-drop-in-scrutinee` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::significant_drop_in_scrutinee)]`
help: try moving the temporary above the match
   |
LL ~     let value = mutex.lock().unwrap().foo();
LL ~     match value {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match s.lock_m().get_the_value() {
...
...
LL |             println!("{}", s.lock_m().get_the_value());
   |                            ---------- another value with significant `Drop` created here
LL |     }
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     let value = s.lock_m().get_the_value();
LL ~     match value {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match s.lock_m_m().get_the_value() {
...
...
LL |             println!("{}", s.lock_m().get_the_value());
   |                            ---------- another value with significant `Drop` created here
LL |     }
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     let value = s.lock_m_m().get_the_value();
LL ~     match value {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
LL |     match counter.temp_increment().len() {
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
---
LL ~     let value = counter.temp_increment().len();
LL ~     match value {
   |

error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |         match (mutex1.lock().unwrap().s.len(), true) {
...
...
LL |                 mutex1.lock().unwrap().s.len();
   |                 ---------------------- another value with significant `Drop` created here
LL |         };
   |          - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~         let value = mutex1.lock().unwrap().s.len();
LL ~         match (value, true) {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |         match (true, mutex1.lock().unwrap().s.len(), true) {
...
...
LL |                 mutex1.lock().unwrap().s.len();
   |                 ---------------------- another value with significant `Drop` created here
LL |         };
   |          - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~         let value = mutex1.lock().unwrap().s.len();
LL ~         match (true, value, true) {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |         match (mutex1.lock().unwrap().s.len(), true, mutex2.lock().unwrap().s.len()) {
...
...
LL |                 mutex1.lock().unwrap().s.len();
   |                 ---------------------- another value with significant `Drop` created here
LL |                 mutex2.lock().unwrap().s.len();
   |                 ---------------------- another value with significant `Drop` created here
LL |         };
   |          - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~         let value = mutex1.lock().unwrap().s.len();
LL ~         match (value, true, mutex2.lock().unwrap().s.len()) {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |         match (mutex1.lock().unwrap().s.len(), true, mutex2.lock().unwrap().s.len()) {
...
...
LL |                 mutex1.lock().unwrap().s.len();
   |                 ---------------------- another value with significant `Drop` created here
LL |                 mutex2.lock().unwrap().s.len();
   |                 ---------------------- another value with significant `Drop` created here
LL |         };
   |          - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~         let value = mutex2.lock().unwrap().s.len();
LL ~         match (mutex1.lock().unwrap().s.len(), true, value) {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |         match mutex3.lock().unwrap().s.as_str() {
...
...
LL |                 mutex1.lock().unwrap().s.len();
   |                 ---------------------- another value with significant `Drop` created here
LL |                 mutex2.lock().unwrap().s.len();
   |                 ---------------------- another value with significant `Drop` created here
LL |         };
   |          - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior

error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |         match (true, mutex3.lock().unwrap().s.as_str()) {
...
...
LL |                 mutex1.lock().unwrap().s.len();
   |                 ---------------------- another value with significant `Drop` created here
LL |                 mutex2.lock().unwrap().s.len();
   |                 ---------------------- another value with significant `Drop` created here
LL |         };
   |          - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior

error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match mutex.lock().unwrap().s.len() > 1 {
...
...
LL |             mutex.lock().unwrap().s.len();
   |             --------------------- another value with significant `Drop` created here
LL |     };
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     let value = mutex.lock().unwrap().s.len() > 1;
LL ~     match value {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match 1 < mutex.lock().unwrap().s.len() {
...
...
LL |             mutex.lock().unwrap().s.len();
   |             --------------------- another value with significant `Drop` created here
LL |     };
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     let value = 1 < mutex.lock().unwrap().s.len();
LL ~     match value {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match mutex1.lock().unwrap().s.len() < mutex2.lock().unwrap().s.len() {
...
...
LL |                 mutex1.lock().unwrap().s.len(),
   |                 ---------------------- another value with significant `Drop` created here
LL |                 mutex2.lock().unwrap().s.len()
   |                 ---------------------- another value with significant `Drop` created here
LL |     };
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     let value = mutex1.lock().unwrap().s.len() < mutex2.lock().unwrap().s.len();
LL ~     match value {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match mutex1.lock().unwrap().s.len() >= mutex2.lock().unwrap().s.len() {
...
...
LL |                 mutex1.lock().unwrap().s.len(),
   |                 ---------------------- another value with significant `Drop` created here
LL |                 mutex2.lock().unwrap().s.len()
   |                 ---------------------- another value with significant `Drop` created here
LL |     };
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     let value = mutex1.lock().unwrap().s.len() >= mutex2.lock().unwrap().s.len();
LL ~     match value {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match get_mutex_guard().s.len() > 1 {
...
...
LL |             mutex1.lock().unwrap().s.len();
   |             ---------------------- another value with significant `Drop` created here
LL |     };
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     let value = get_mutex_guard().s.len() > 1;
LL ~     match value {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
LL |       match match i {
   |  ___________^
LL | |
LL | |
LL | |
LL | |         100 => mutex1.lock().unwrap(),
...  |
LL | |     .len()
LL | |         > 1
   | |___________^
...
LL |               mutex1.lock().unwrap().s.len();
   |               ---------------------- another value with significant `Drop` created here
LL |       };
   |        - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
---
LL +         > 1;
LL ~     match value
   |

error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |       match if i > 1 {
LL | |
LL | |
LL | |         mutex1.lock().unwrap()
...  |
...  |
LL | |     .len()
LL | |         > 1
   | |___________^
...
LL |               mutex1.lock().unwrap().s.len();
   |               ---------------------- another value with significant `Drop` created here
LL |       };
   |        - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     let value = if i > 1 {
LL +
LL +         mutex1.lock().unwrap()
LL +     } else {
LL +         mutex2.lock().unwrap()
LL +         mutex2.lock().unwrap()
LL +     }
LL +     .s
LL +     .len()
LL +         > 1;
LL ~     match value
   |

error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match s.lock().deref().deref() {
...
...
LL |         _ => println!("Value is {}", s.lock().deref()),
   |                                      ---------------- another value with significant `Drop` created here
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match and create a copy
help: try moving the temporary above the match and create a copy
   |
LL ~     let value = *s.lock().deref().deref();
LL ~     match value {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match s.lock().deref().deref() {
...
...
LL |         matcher => println!("Value is {}", s.lock().deref()),
   |                                            ---------------- another value with significant `Drop` created here
LL |         _ => println!("Value was not a match"),
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match mutex.lock().unwrap().i = i {
...
...
LL |             println!("{}", mutex.lock().unwrap().i);
   |                            --------------------- another value with significant `Drop` created here
LL |     };
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     mutex.lock().unwrap().i = i;
LL ~     match () {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match i = mutex.lock().unwrap().i {
...
...
LL |             println!("{}", mutex.lock().unwrap().i);
   |                            --------------------- another value with significant `Drop` created here
LL |     };
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     i = mutex.lock().unwrap().i;
LL ~     match () {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match mutex.lock().unwrap().i += 1 {
...
...
LL |             println!("{}", mutex.lock().unwrap().i);
   |                            --------------------- another value with significant `Drop` created here
LL |     };
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     mutex.lock().unwrap().i += 1;
LL ~     match () {


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match i += mutex.lock().unwrap().i {
...
...
LL |             println!("{}", mutex.lock().unwrap().i);
   |                            --------------------- another value with significant `Drop` created here
LL |     };
   |      - temporary lives until here
   |
   = note: this might lead to deadlocks or other unexpected behavior
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     i += mutex.lock().unwrap().i;
LL ~     match () {

error: sub-expression diverges
##[error]  --> tests/ui/significant_drop_in_scrutinee.rs:616:55
   |
   |
LL |     let result = rwlock.read().unwrap().parse::<u64>()?;
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match rwlock.read().unwrap().to_number() {
...
LL |     };
   |      - temporary lives until here
   |
   |
   = note: this might lead to deadlocks or other unexpected behavior

error: temporary with significant `Drop` in `for` loop condition will live until the end of the `for` expression
   |
   |
LL |     for s in rwlock.read().unwrap().iter() {
...
LL |     }
   |      - temporary lives until here
   |
   |
   = note: this might lead to deadlocks or other unexpected behavior

error: temporary with significant `Drop` in `match` scrutinee will live until the end of the `match` expression
   |
   |
LL |     match mutex.lock().unwrap().foo() {
...
LL |     };
   |      - temporary lives until here
   |
   |
   = note: this might lead to deadlocks or other unexpected behavior
help: try moving the temporary above the match
   |
LL ~     let value = mutex.lock().unwrap().foo();
LL ~     match value {

error: aborting due to 27 previous errors



full stdout:



FAILED TEST: tests/ui/toplevel_ref_arg.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/toplevel_ref_arg.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/toplevel_ref_arg_non_rustfix.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/toplevel_ref_arg_non_rustfix.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/try_err.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/try_err.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/tuple_array_conversions.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/tuple_array_conversions.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/uninlined_format_args.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/uninlined_format_args.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/unit_arg.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/unit_arg.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/unnecessary_fallible_conversions_unfixable.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/unnecessary_fallible_conversions_unfixable.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/unnecessary_lazy_eval.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/unnecessary_lazy_eval.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/type_repetition_in_bounds.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/type_repetition_in_bounds.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/type_repetition_in_bounds.stderr` to the actual output
--- tests/ui/type_repetition_in_bounds.stderr
+++ <stderr output>
+++ <stderr output>
 error: this type has already been used as a bound predicate
   --> tests/ui/type_repetition_in_bounds.rs:10:5
... 17 lines skipped ...
    = help: consider combining the bounds: `Self: Clone + Copy + Default + Ord`
+error: sub-expression diverges
+  --> tests/ui/type_repetition_in_bounds.rs:67:29
+   |
+LL |     #[derive(Debug, Serialize, Deserialize)]
---
+
 error: this type has already been used as a bound predicate
   --> tests/ui/type_repetition_in_bounds.rs:103:5
... 20 lines skipped ...
    = help: consider combining the bounds: `T: ?Sized + Trait<Option<usize>, Box<[String]>, bool>`
-error: aborting due to 5 previous errors
+error: aborting due to 13 previous errors
 

---
   |
LL |     T: Clone,
   |     ^^^^^^^^
   |
   = help: consider combining the bounds: `T: Copy + Clone`
  --> tests/ui/type_repetition_in_bounds.rs:1:9
   |
LL | #![deny(clippy::type_repetition_in_bounds)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: this type has already been used as a bound predicate
##[error]  --> tests/ui/type_repetition_in_bounds.rs:28:5
   |
LL |     Self: Copy + Default + Ord,
   |
   |
   = help: consider combining the bounds: `Self: Clone + Copy + Default + Ord`
error: sub-expression diverges
##[error]  --> tests/ui/type_repetition_in_bounds.rs:67:29
   |
LL |     #[derive(Debug, Serialize, Deserialize)]
---
   |
LL |     T: Clone,
   |     ^^^^^^^^
   |
   = help: consider combining the bounds: `T: ?Sized + Clone`
error: this type has already been used as a bound predicate
##[error]  --> tests/ui/type_repetition_in_bounds.rs:109:5
   |
   |
LL |     T: ?Sized,
   |
   |
   = help: consider combining the bounds: `T: Clone + ?Sized`
error: this type has already been used as a bound predicate
##[error]  --> tests/ui/type_repetition_in_bounds.rs:135:9
   |
   |
LL |         T: Trait<Option<usize>, Box<[String]>, bool> + 'static,
   |
   |
   = help: consider combining the bounds: `T: ?Sized + Trait<Option<usize>, Box<[String]>, bool>`
error: aborting due to 13 previous errors


full stdout:
full stdout:



FAILED TEST: tests/ui/unnecessary_unsafety_doc.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/unnecessary_unsafety_doc.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/unneeded_field_pattern.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/unneeded_field_pattern.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/unneeded_wildcard_pattern.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/unneeded_wildcard_pattern.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/unnecessary_to_owned.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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_to_owned.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/unnecessary_to_owned.stderr` to the actual output
--- tests/ui/unnecessary_to_owned.stderr
+++ <stderr output>
+++ <stderr output>
 error: redundant clone
   --> tests/ui/unnecessary_to_owned.rs:155:64
... 515 lines skipped ...
    |            ^^^^^^^^^^^^^^^^^ help: use: `"abc"`
+error: sub-expression diverges
+  --> tests/ui/unnecessary_to_owned.rs:480:50
+   |
+   |
+LL |         let base_iri = Iri::parse(url.to_owned())?;
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
+
 error: unnecessary use of `to_vec`
   --> tests/ui/unnecessary_to_owned.rs:530:37
... 32 lines skipped ...
    |              ^^^^^^^^^^^^^^^^^^ help: replace it with: `(&["b"]).as_slice()`
-error: aborting due to 85 previous errors
+error: aborting due to 86 previous errors
 



full stderr:
error: redundant clone
##[error]  --> tests/ui/unnecessary_to_owned.rs:155:64
   |
LL |     require_c_str(&CString::from_vec_with_nul(vec![0]).unwrap().to_owned());
   |
note: this value is dropped without further use
  --> tests/ui/unnecessary_to_owned.rs:155:20
   |
   |
LL |     require_c_str(&CString::from_vec_with_nul(vec![0]).unwrap().to_owned());
   = note: `-D clippy::redundant-clone` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::redundant_clone)]`

error: redundant clone
error: redundant clone
##[error]  --> tests/ui/unnecessary_to_owned.rs:156:40
   |
LL |     require_os_str(&OsString::from("x").to_os_string());
   |
note: this value is dropped without further use
  --> tests/ui/unnecessary_to_owned.rs:156:21
   |
   |
LL |     require_os_str(&OsString::from("x").to_os_string());

error: redundant clone
##[error]  --> tests/ui/unnecessary_to_owned.rs:157:48
   |
   |
LL |     require_path(&std::path::PathBuf::from("x").to_path_buf());
   |
note: this value is dropped without further use
  --> tests/ui/unnecessary_to_owned.rs:157:19
   |
   |
LL |     require_path(&std::path::PathBuf::from("x").to_path_buf());

error: redundant clone
##[error]  --> tests/ui/unnecessary_to_owned.rs:158:35
   |
   |
LL |     require_str(&String::from("x").to_string());
   |
note: this value is dropped without further use
  --> tests/ui/unnecessary_to_owned.rs:158:18
   |
   |
LL |     require_str(&String::from("x").to_string());

error: redundant clone
##[error]  --> tests/ui/unnecessary_to_owned.rs:159:39
   |
   |
LL |     require_slice(&[String::from("x")].to_owned());
   |
note: this value is dropped without further use
  --> tests/ui/unnecessary_to_owned.rs:159:20
   |
   |
LL |     require_slice(&[String::from("x")].to_owned());

error: unnecessary use of `into_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:64:36
   |
   |
LL |     require_c_str(&Cow::from(c_str).into_owned());
   |
   = 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_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:65:19
   |
LL |     require_c_str(&c_str.to_owned());
   |                   ^^^^^^^^^^^^^^^^^ help: use: `c_str`
error: unnecessary use of `to_os_string`
##[error]  --> tests/ui/unnecessary_to_owned.rs:67:20
   |
   |
LL |     require_os_str(&os_str.to_os_string());
   |                    ^^^^^^^^^^^^^^^^^^^^^^ help: use: `os_str`
error: unnecessary use of `into_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:68:38
   |
   |
LL |     require_os_str(&Cow::from(os_str).into_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:69:20
   |
   |
LL |     require_os_str(&os_str.to_owned());
   |                    ^^^^^^^^^^^^^^^^^^ help: use: `os_str`
error: unnecessary use of `to_path_buf`
##[error]  --> tests/ui/unnecessary_to_owned.rs:71:18
   |
LL |     require_path(&path.to_path_buf());
LL |     require_path(&path.to_path_buf());
   |                  ^^^^^^^^^^^^^^^^^^^ help: use: `path`

error: unnecessary use of `into_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:72:34
   |
LL |     require_path(&Cow::from(path).into_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:73:18
   |
---

error: unnecessary use of `into_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:76:30
   |
LL |     require_str(&Cow::from(s).into_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:77:17
   |
   |
LL |     require_str(&s.to_owned());
   |                 ^^^^^^^^^^^^^ help: use: `s`

error: unnecessary use of `to_string`
##[error]  --> tests/ui/unnecessary_to_owned.rs:78:17
   |
LL |     require_str(&x_ref.to_string());
   |                 ^^^^^^^^^^^^^^^^^^ help: use: `x_ref.as_ref()`
error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:80:19
   |
   |
LL |     require_slice(&slice.to_vec());

error: unnecessary use of `into_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:81:36
   |
   |
LL |     require_slice(&Cow::from(slice).into_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:82:19
   |
   |
LL |     require_slice(&array.to_owned());
   |                   ^^^^^^^^^^^^^^^^^ help: use: `array.as_ref()`
error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:83:19
   |
   |
LL |     require_slice(&array_ref.to_owned());
   |                   ^^^^^^^^^^^^^^^^^^^^^ help: use: `array_ref.as_ref()`
error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:84:19
   |
   |
LL |     require_slice(&slice.to_owned());

error: unnecessary use of `into_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:87:42
   |
   |
LL |     require_x(&Cow::<X>::Owned(x.clone()).into_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:90:25
   |
   |
LL |     require_deref_c_str(c_str.to_owned());
   |                         ^^^^^^^^^^^^^^^^ help: use: `c_str`
error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:91:26
   |
LL |     require_deref_os_str(os_str.to_owned());
---

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:96:30
   |
LL |     require_impl_deref_c_str(c_str.to_owned());
   |                              ^^^^^^^^^^^^^^^^ help: use: `c_str`
error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:97:31
   |
LL |     require_impl_deref_os_str(os_str.to_owned());
---

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:102:29
   |
LL |     require_deref_str_slice(s.to_owned(), slice.to_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:102:43
   |
   |
LL |     require_deref_str_slice(s.to_owned(), slice.to_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:103:29
   |
---

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:105:26
   |
LL |     require_as_ref_c_str(c_str.to_owned());
   |                          ^^^^^^^^^^^^^^^^ help: use: `c_str`
error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:106:27
   |
LL |     require_as_ref_os_str(os_str.to_owned());
---

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:114:31
   |
LL |     require_impl_as_ref_c_str(c_str.to_owned());
   |                               ^^^^^^^^^^^^^^^^ help: use: `c_str`
error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:115:32
   |
LL |     require_impl_as_ref_os_str(os_str.to_owned());
---

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:123:30
   |
LL |     require_as_ref_str_slice(s.to_owned(), array.to_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:123:44
   |
   |
LL |     require_as_ref_str_slice(s.to_owned(), array.to_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:124:30
   |
   |
LL |     require_as_ref_str_slice(s.to_owned(), array_ref.to_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:124:44
   |
   |
LL |     require_as_ref_str_slice(s.to_owned(), array_ref.to_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:125:30
   |
   |
LL |     require_as_ref_str_slice(s.to_owned(), slice.to_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:125:44
   |
   |
LL |     require_as_ref_str_slice(s.to_owned(), slice.to_owned());

error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:126:30
   |
---

error: unnecessary use of `to_string`
##[error]  --> tests/ui/unnecessary_to_owned.rs:130:20
   |
LL |     let _ = x.join(&x_ref.to_string());
   |                    ^^^^^^^^^^^^^^^^^^ help: use: `x_ref`
error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:132:13
   |
   |
LL |     let _ = slice.to_vec().into_iter();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `slice.iter().copied()`
error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:133:13
   |
LL |     let _ = slice.to_owned().into_iter();
LL |     let _ = slice.to_owned().into_iter();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `slice.iter().copied()`
error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:134:13
   |
   |
LL |     let _ = [std::path::PathBuf::new()][..].to_vec().into_iter();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[std::path::PathBuf::new()][..].iter().cloned()`
error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:135:13
   |
   |
LL |     let _ = [std::path::PathBuf::new()][..].to_owned().into_iter();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[std::path::PathBuf::new()][..].iter().cloned()`
error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:137:13
   |
   |
LL |     let _ = IntoIterator::into_iter(slice.to_vec());
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `slice.iter().copied()`
error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:138:13
   |
LL |     let _ = IntoIterator::into_iter(slice.to_owned());
LL |     let _ = IntoIterator::into_iter(slice.to_owned());
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `slice.iter().copied()`
error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:139:13
   |
   |
LL |     let _ = IntoIterator::into_iter([std::path::PathBuf::new()][..].to_vec());
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[std::path::PathBuf::new()][..].iter().cloned()`
error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:140:13
   |
   |
LL |     let _ = IntoIterator::into_iter([std::path::PathBuf::new()][..].to_owned());
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[std::path::PathBuf::new()][..].iter().cloned()`
error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:202:14
   |
LL |     for t in file_types.to_vec() {
---
LL |     for t in file_types {
   |              ~~~~~~~~~~
help: remove this `&`
   |
LL -         let path = match get_file_path(&t) {
LL +         let path = match get_file_path(t) {

error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:225:14
   |
   |
LL |     let _ = &["x"][..].to_vec().into_iter();
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `["x"][..].iter().cloned()`
error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:230:14
   |
   |
LL |     let _ = &["x"][..].to_vec().into_iter();
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `["x"][..].iter().copied()`
error: unnecessary use of `to_string`
##[error]  --> tests/ui/unnecessary_to_owned.rs:278:24
   |
   |
LL |         Box::new(build(y.to_string()))
   |                        ^^^^^^^^^^^^^ help: use: `y`
error: unnecessary use of `to_string`
##[error]  --> tests/ui/unnecessary_to_owned.rs:387:12
   |
   |
LL |         id("abc".to_string())
   |            ^^^^^^^^^^^^^^^^^ help: use: `"abc"`
error: sub-expression diverges
##[error]  --> tests/ui/unnecessary_to_owned.rs:480:50
   |
   |
LL |         let base_iri = Iri::parse(url.to_owned())?;
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:530:37
   |
LL |         IntoFuture::into_future(foo([].to_vec(), &0));
   |                                     ^^^^^^^^^^^ help: use: `[]`
error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:540:18
   |
   |
LL |         s.remove(&a.to_vec());
   |                  ^^^^^^^^^^^ help: replace it with: `a`
error: unnecessary use of `to_owned`
##[error]  --> tests/ui/unnecessary_to_owned.rs:544:14
   |
   |
LL |     s.remove(&"b".to_owned());
   |              ^^^^^^^^^^^^^^^ help: replace it with: `"b"`
error: unnecessary use of `to_string`
##[error]  --> tests/ui/unnecessary_to_owned.rs:545:14
   |
   |
LL |     s.remove(&"b".to_string());
   |              ^^^^^^^^^^^^^^^^ help: replace it with: `"b"`
error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:550:14
   |
   |
LL |     s.remove(&["b"].to_vec());
   |              ^^^^^^^^^^^^^^^ help: replace it with: `["b"].as_slice()`
error: unnecessary use of `to_vec`
##[error]  --> tests/ui/unnecessary_to_owned.rs:551:14
   |
   |
LL |     s.remove(&(&["b"]).to_vec());
   |              ^^^^^^^^^^^^^^^^^^ help: replace it with: `(&["b"]).as_slice()`
error: aborting due to 86 previous errors


full stdout:
full stdout:



FAILED TEST: tests/ui/unused_io_amount.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/unused_io_amount.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/unused_io_amount.stderr` to the actual output
--- tests/ui/unused_io_amount.stderr
+++ <stderr output>
---
 
+error: sub-expression diverges
+  --> tests/ui/unused_io_amount.rs:10:21
+   |
+LL |     s.write(b"test")?;
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
---
 
+error: sub-expression diverges
+  --> tests/ui/unused_io_amount.rs:27:57
+   |
+LL |     s.read_vectored(&mut [io::IoSliceMut::new(&mut [])])?;
+
+error: sub-expression diverges
+  --> tests/ui/unused_io_amount.rs:29:47
+   |
+   |
+LL |     s.write_vectored(&[io::IoSlice::new(&[])])?;
+
 error: read amount is not handled
   --> tests/ui/unused_io_amount.rs:37:5
... 4 lines skipped ...
... 4 lines skipped ...
    = help: use `Read::read_exact` instead, or handle partial reads
 
+error: sub-expression diverges
+  --> tests/ui/unused_io_amount.rs:35:52
+   |
+LL |     let mut reader = std::fs::File::open(file).ok()?;
+
+error: sub-expression diverges
+  --> tests/ui/unused_io_amount.rs:37:34
+   |
+   |
+LL |     reader.read(&mut result).ok()?;
+
 error: read amount is not handled
   --> tests/ui/unused_io_amount.rs:47:5
... 4 lines skipped ...
---
+
+error: sub-expression diverges
+  --> tests/ui/unused_io_amount.rs:47:53
+   |
+LL |     reader.read(&mut result).or_else(|err| Err(err))?;
+
 error: read amount is not handled
   --> tests/ui/unused_io_amount.rs:60:5
... 4 lines skipped ...
... 4 lines skipped ...
    = help: use `Read::read_exact` instead, or handle partial reads
 
+error: sub-expression diverges
+  --> tests/ui/unused_io_amount.rs:60:50
+   |
+LL |     reader.read(&mut result).or(Err(Error::Kind))?;
+
 error: read amount is not handled
   --> tests/ui/unused_io_amount.rs:68:5
... 73 lines skipped ...
... 73 lines skipped ...
    = help: use `AsyncWriteExt::write_all` instead, or handle partial writes
 
+error: sub-expression diverges
+  --> tests/ui/unused_io_amount.rs:110:38
+   |
+LL |         w.write(b"hello world").await?;
+
 error: read amount is not handled
   --> tests/ui/unused_io_amount.rs:119:9
... 4 lines skipped ...
... 4 lines skipped ...
    = help: use `AsyncReadExt::read_exact` instead, or handle partial reads
 
+error: sub-expression diverges
+  --> tests/ui/unused_io_amount.rs:119:56
+   |
+LL |         r.read(&mut buf[..]).await.or(Err(Error::Kind))?;
+
 error: written amount is not handled
   --> tests/ui/unused_io_amount.rs:128:5
... 103 lines skipped ...
---
full stderr:
error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:10:5
   |
LL |     s.write(b"test")?;
   |
   = help: use `Write::write_all` instead, or handle partial writes
   = note: `-D clippy::unused-io-amount` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::unused_io_amount)]`
---

error: sub-expression diverges
##[error]  --> tests/ui/unused_io_amount.rs:10:21
   |
LL |     s.write(b"test")?;
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`

---

error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:19:5
   |
LL |     s.write(b"test").unwrap();
   |
   = help: use `Write::write_all` instead, or handle partial writes

error: read amount is not handled
---

error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:27:5
   |
LL |     s.read_vectored(&mut [io::IoSliceMut::new(&mut [])])?;

error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:29:5
   |
   |
LL |     s.write_vectored(&[io::IoSlice::new(&[])])?;

error: sub-expression diverges
##[error]  --> tests/ui/unused_io_amount.rs:27:57
   |
   |
LL |     s.read_vectored(&mut [io::IoSliceMut::new(&mut [])])?;

error: sub-expression diverges
##[error]  --> tests/ui/unused_io_amount.rs:29:47
   |
   |
LL |     s.write_vectored(&[io::IoSlice::new(&[])])?;

error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:37:5
   |
   |
LL |     reader.read(&mut result).ok()?;
   |
   = help: use `Read::read_exact` instead, or handle partial reads

error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/unused_io_amount.rs:35:52
   |
LL |     let mut reader = std::fs::File::open(file).ok()?;

error: sub-expression diverges
##[error]  --> tests/ui/unused_io_amount.rs:37:34
   |
   |
LL |     reader.read(&mut result).ok()?;

error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:47:5
   |
   |
LL |     reader.read(&mut result).or_else(|err| Err(err))?;
   |
   = help: use `Read::read_exact` instead, or handle partial reads

error: sub-expression diverges
---

error: sub-expression diverges
##[error]  --> tests/ui/unused_io_amount.rs:47:53
   |
LL |     reader.read(&mut result).or_else(|err| Err(err))?;

error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:60:5
   |
   |
LL |     reader.read(&mut result).or(Err(Error::Kind))?;
   |
   = help: use `Read::read_exact` instead, or handle partial reads

error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/unused_io_amount.rs:60:50
   |
LL |     reader.read(&mut result).or(Err(Error::Kind))?;

error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:68:5
   |
   |
LL | /     reader
LL | |
LL | |         .read(&mut result)
LL | |         .or(Err(Error::Kind))
LL | |         .or(Err(Error::Kind))
LL | |         .expect("error");
   |
   = help: use `Read::read_exact` instead, or handle partial reads

error: written amount is not handled
error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:78:5
   |
LL |     s.write(b"ok").is_ok();
   |
   = help: use `Write::write_all` instead, or handle partial writes

error: written amount is not handled
error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:80:5
   |
LL |     s.write(b"err").is_err();
   |
   = help: use `Write::write_all` instead, or handle partial writes

error: read amount is not handled
error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:83:5
   |
LL |     s.read(&mut buf).is_ok();
   |
   = help: use `Read::read_exact` instead, or handle partial reads

error: read amount is not handled
error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:85:5
   |
LL |     s.read(&mut buf).is_err();
   |
   = help: use `Read::read_exact` instead, or handle partial reads

error: written amount is not handled
error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:90:5
   |
LL |     w.write(b"hello world").await.unwrap();
   |
   = help: use `AsyncWriteExt::write_all` instead, or handle partial writes

error: read amount is not handled
error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:96:5
   |
LL |     r.read(&mut buf[..]).await.unwrap();
   |
   = help: use `AsyncReadExt::read_exact` instead, or handle partial reads

error: written amount is not handled
error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:104:5
   |
LL |     w.write(b"hello world");
   |
   = help: use `AsyncWriteExt::write_all` instead, or handle partial writes

error: written amount is not handled
error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:110:9
   |
LL |         w.write(b"hello world").await?;
   |
   = help: use `AsyncWriteExt::write_all` instead, or handle partial writes

error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/unused_io_amount.rs:110:38
   |
LL |         w.write(b"hello world").await?;

error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:119:9
   |
   |
LL |         r.read(&mut buf[..]).await.or(Err(Error::Kind))?;
   |
   = help: use `AsyncReadExt::read_exact` instead, or handle partial reads

error: sub-expression diverges
error: sub-expression diverges
##[error]  --> tests/ui/unused_io_amount.rs:119:56
   |
LL |         r.read(&mut buf[..]).await.or(Err(Error::Kind))?;

error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:128:5
   |
   |
LL |     w.write(b"hello world").await.unwrap();
   |
   = help: use `AsyncWriteExt::write_all` instead, or handle partial writes

error: read amount is not handled
error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:134:5
   |
LL |     r.read(&mut buf[..]).await.unwrap();
   |
   = help: use `AsyncReadExt::read_exact` instead, or handle partial reads

error: written amount is not handled
error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:147:11
   |
LL |     match s.write(b"test") {
   |
   = help: use `Write::write_all` instead, or handle partial writes
note: the result is consumed here, but the amount of I/O bytes remains unhandled
  --> tests/ui/unused_io_amount.rs:149:9
---

error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:164:11
   |
LL |     match s.read(&mut [0u8; 4]) {
   |
   = help: use `Read::read_exact` instead, or handle partial reads
note: the result is consumed here, but the amount of I/O bytes remains unhandled
  --> tests/ui/unused_io_amount.rs:166:9
  --> tests/ui/unused_io_amount.rs:166:9
   |
LL |         Ok(_) => todo!(),
   |         ^^^^^

error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:173:11
   |
LL |     match s.write(b"test") {
   |
   = help: use `Write::write_all` instead, or handle partial writes
note: the result is consumed here, but the amount of I/O bytes remains unhandled
  --> tests/ui/unused_io_amount.rs:175:9
  --> tests/ui/unused_io_amount.rs:175:9
   |
LL |         Ok(_) => todo!(),
   |         ^^^^^

error: read amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:186:8
   |
LL |     if let Ok(_) = s.read(&mut [0u8; 4]) {
   |
   = help: use `Read::read_exact` instead, or handle partial reads
note: the result is consumed here, but the amount of I/O bytes remains unhandled
  --> tests/ui/unused_io_amount.rs:186:12
  --> tests/ui/unused_io_amount.rs:186:12
   |
LL |     if let Ok(_) = s.read(&mut [0u8; 4]) {

error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:193:8
   |
   |
LL |     if let Ok(_) = s.write(b"test") {
   |
   = help: use `Write::write_all` instead, or handle partial writes
note: the result is consumed here, but the amount of I/O bytes remains unhandled
  --> tests/ui/unused_io_amount.rs:193:12
  --> tests/ui/unused_io_amount.rs:193:12
   |
LL |     if let Ok(_) = s.write(b"test") {

error: written amount is not handled
##[error]  --> tests/ui/unused_io_amount.rs:200:8
   |
   |
LL |     if let Ok(..) = s.write(b"test") {
   |
   = help: use `Write::write_all` instead, or handle partial writes
note: the result is consumed here, but the amount of I/O bytes remains unhandled
  --> tests/ui/unused_io_amount.rs:200:12
  --> tests/ui/unused_io_amount.rs:200:12
   |
LL |     if let Ok(..) = s.write(b"test") {

error: sub-expression diverges
##[error]  --> tests/ui/unused_io_amount.rs:233:36
   |
   |
LL |     let read = { rdr.read(&mut [0])? };

error: aborting due to 40 previous errors



full stdout:



FAILED TEST: tests/ui/verbose_file_reads.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/verbose_file_reads.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/verbose_file_reads.stderr` to the actual output
--- tests/ui/verbose_file_reads.stderr
+++ <stderr output>
---
 
+error: sub-expression diverges
+  --> tests/ui/verbose_file_reads.rs:27:41
+   |
+LL |     f.read_to_string(&mut string_buffer)?;
+
 error: use of `File::read_to_string`
   --> tests/ui/verbose_file_reads.rs:27:5
... 4 lines skipped ...
---

error: sub-expression diverges
##[error]  --> tests/ui/verbose_file_reads.rs:27:41
   |
LL |     f.read_to_string(&mut string_buffer)?;

error: use of `File::read_to_string`
##[error]  --> tests/ui/verbose_file_reads.rs:27:5
   |
   |
LL |     f.read_to_string(&mut string_buffer)?;
   |
   = help: consider using `fs::read_to_string` instead

error: aborting due to 5 previous errors
error: aborting due to 5 previous errors


full stdout:



FAILED TEST: tests/ui/use_self.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/use_self.rs" "--edition" "2021" "--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"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/use_self.stderr` to the actual output
--- tests/ui/use_self.stderr
+++ <stderr output>
---

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:106:24
   |
LL |         fn bad(foos: &[Foo]) -> impl Iterator<Item = &Foo> {

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:106:55
   |
   |
LL |         fn bad(foos: &[Foo]) -> impl Iterator<Item = &Foo> {

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:121:13
   |
---

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:157:21
   |
LL |                     Bar { foo: Foo {} }

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:168:21
   |
   |
LL |         fn baz() -> Foo {

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:169:13
   |
   |
LL |             Foo {}
   |             ^^^ help: use the applicable keyword: `Self`

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:186:21
   |
LL |             let _ = Enum::B(42);

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:187:21
   |
   |
LL |             let _ = Enum::C { field: true };

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:188:21
   |
   |
LL |             let _ = Enum::A;
   |                     ^^^^ help: use the applicable keyword: `Self`

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:230:13
   |
LL |             nested::A::fun_1();

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:231:13
   |
   |
LL |             nested::A::A;

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:233:13
   |
   |
LL |             nested::A {};

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:252:13
   |
   |
LL |             TestStruct::from_something()
   |             ^^^^^^^^^^ help: use the applicable keyword: `Self`

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:266:25
   |
LL |         async fn g() -> S {

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:267:13
   |
   |
LL |             S {}
   |             ^ help: use the applicable keyword: `Self`

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:271:16
   |
LL |             &p[S::A..S::B]

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:271:22
   |
   |
LL |             &p[S::A..S::B]

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:294:29
   |
   |
LL |         fn foo(value: T) -> Foo<T> {

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:295:13
   |
   |
LL |             Foo::<T> { value }

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:467:13
   |
   |
LL |             A::new::<submod::B>(submod::B {})

error: sub-expression diverges
##[error]  --> tests/ui/use_self.rs:473:31
   |
---

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:542:17
   |
LL |                 Foo::Baz => unimplemented!(),

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:548:20
   |
   |
LL |             if let Foo::Bar = self {
   |                    ^^^ help: use the applicable keyword: `Self`

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:572:17
   |
LL |                 Something::Num(n) => *n,

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:573:17
   |
   |
LL |                 Something::TupleNums(n, _m) => *n,

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:574:17
   |
   |
LL |                 Something::StructNums { one, two: _ } => *one,

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:580:17
   |
   |
LL |                 crate::issue8845::Something::Num(n) => *n,

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:581:17
   |
   |
LL |                 crate::issue8845::Something::TupleNums(n, _m) => *n,

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:582:17
   |
   |
LL |                 crate::issue8845::Something::StructNums { one, two: _ } => *one,

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:598:17
   |
   |
LL |             let Foo(x) = self;

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:603:17
   |
   |
LL |             let crate::issue8845::Foo(x) = self;

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:610:17
   |
   |
LL |             let Bar { x, .. } = self;

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:615:17
   |
   |
LL |             let crate::issue8845::Bar { x, .. } = self;

error: unnecessary structure name repetition
##[error]  --> tests/ui/use_self.rs:654:17
   |
   |
LL |                 E::A => {},

error: aborting due to 47 previous errors



full stdout:



FAILED TEST: tests/ui/useless_conversion.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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/useless_conversion.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/useless_conversion.stderr` to the actual output
--- tests/ui/useless_conversion.stderr
+++ <stderr output>
+++ <stderr output>
 error: useless conversion to the same type: `T`
   --> tests/ui/useless_conversion.rs:5:13
... 14 lines skipped ...
    |     ^^^^^^^^^^ help: consider removing `.into()`: `val`
+error: sub-expression diverges
+  --> tests/ui/useless_conversion.rs:20:6
+   |
+LL |     }??;
---
+
 error: useless conversion to the same type: `i32`
   --> tests/ui/useless_conversion.rs:18:22
... 2 lines skipped ...
    |                      ^^^^^^^^^^^ help: consider removing `.into()`: `0i32`
+error: sub-expression diverges
+  --> tests/ui/useless_conversion.rs:29:32
+   |
+   |
+LL |     for _ in fs::read_dir(path)? {}
+
 error: useless conversion to the same type: `std::str::Lines<'_>`
   --> tests/ui/useless_conversion.rs:48:22
... 200 lines skipped ...
---
full stderr:
error: useless conversion to the same type: `T`
##[error]  --> tests/ui/useless_conversion.rs:5:13
   |
LL |     let _ = T::from(val);
   |             ^^^^^^^^^^^^ help: consider removing `T::from()`: `val`
note: the lint level is defined here
  --> tests/ui/useless_conversion.rs:1:9
   |
LL | #![deny(clippy::useless_conversion)]
LL | #![deny(clippy::useless_conversion)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: useless conversion to the same type: `T`
##[error]  --> tests/ui/useless_conversion.rs:6:5
   |
LL |     val.into()
   |     ^^^^^^^^^^ help: consider removing `.into()`: `val`
error: sub-expression diverges
##[error]  --> tests/ui/useless_conversion.rs:20:6
   |
LL |     }??;
---

error: useless conversion to the same type: `i32`
##[error]  --> tests/ui/useless_conversion.rs:18:22
   |
LL |         let _: i32 = 0i32.into();
   |                      ^^^^^^^^^^^ help: consider removing `.into()`: `0i32`
error: sub-expression diverges
##[error]  --> tests/ui/useless_conversion.rs:29:32
   |
   |
LL |     for _ in fs::read_dir(path)? {}

error: useless conversion to the same type: `std::str::Lines<'_>`
##[error]  --> tests/ui/useless_conversion.rs:48:22
   |
   |
LL |     if Some("ok") == lines.into_iter().next() {}
   |                      ^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `lines`
error: useless conversion to the same type: `std::str::Lines<'_>`
##[error]  --> tests/ui/useless_conversion.rs:53:21
   |
LL |     let mut lines = text.lines().into_iter();
LL |     let mut lines = text.lines().into_iter();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `text.lines()`
error: useless conversion to the same type: `std::str::Lines<'_>`
##[error]  --> tests/ui/useless_conversion.rs:59:22
   |
   |
LL |     if Some("ok") == text.lines().into_iter().next() {}
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `text.lines()`
error: useless conversion to the same type: `std::ops::Range<i32>`
##[error]  --> tests/ui/useless_conversion.rs:65:13
   |
LL |     let _ = NUMBERS.into_iter().next();
LL |     let _ = NUMBERS.into_iter().next();
   |             ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `NUMBERS`
error: useless conversion to the same type: `std::ops::Range<i32>`
##[error]  --> tests/ui/useless_conversion.rs:70:17
   |
LL |     let mut n = NUMBERS.into_iter();
LL |     let mut n = NUMBERS.into_iter();
   |                 ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `NUMBERS`
error: useless conversion to the same type: `std::string::String`
##[error]  --> tests/ui/useless_conversion.rs:132:21
   |
   |
LL |     let _: String = "foo".to_string().into();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"foo".to_string()`
error: useless conversion to the same type: `std::string::String`
##[error]  --> tests/ui/useless_conversion.rs:133:21
   |
   |
LL |     let _: String = From::from("foo".to_string());
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `From::from()`: `"foo".to_string()`
error: useless conversion to the same type: `std::string::String`
##[error]  --> tests/ui/useless_conversion.rs:134:13
   |
   |
LL |     let _ = String::from("foo".to_string());
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `"foo".to_string()`
error: useless conversion to the same type: `std::string::String`
##[error]  --> tests/ui/useless_conversion.rs:135:13
   |
   |
LL |     let _ = String::from(format!("A: {:04}", 123));
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("A: {:04}", 123)`
error: useless conversion to the same type: `std::str::Lines<'_>`
##[error]  --> tests/ui/useless_conversion.rs:136:13
   |
   |
LL |     let _ = "".lines().into_iter();
   |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `"".lines()`
error: useless conversion to the same type: `std::vec::IntoIter<i32>`
##[error]  --> tests/ui/useless_conversion.rs:137:13
   |
   |
LL |     let _ = vec![1, 2, 3].into_iter().into_iter();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `vec![1, 2, 3].into_iter()`
error: useless conversion to the same type: `std::string::String`
##[error]  --> tests/ui/useless_conversion.rs:138:21
   |
   |
LL |     let _: String = format!("Hello {}", "world").into();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Hello {}", "world")`
error: useless conversion to the same type: `i32`
##[error]  --> tests/ui/useless_conversion.rs:143:13
   |
   |
LL |     let _ = i32::from(a + b) * 3;
   |             ^^^^^^^^^^^^^^^^ help: consider removing `i32::from()`: `(a + b)`

error: useless conversion to the same type: `Foo<'a'>`
   |
   |
LL |     let _: Foo<'a'> = s2.into();
   |                       ^^^^^^^^^ help: consider removing `.into()`: `s2`

error: useless conversion to the same type: `Foo<'a'>`
   |
   |
LL |     let _ = Foo::<'a'>::from(s3);
   |             ^^^^^^^^^^^^^^^^^^^^ help: consider removing `Foo::<'a'>::from()`: `s3`

error: useless conversion to the same type: `std::vec::IntoIter<Foo<'a'>>`
   |
   |
LL |     let _ = vec![s4, s4, s4].into_iter().into_iter();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `vec![s4, s4, s4].into_iter()`

error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   |
   |
LL |     b(vec![1, 2].into_iter());
   |       ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `vec![1, 2]`
   |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   |
   |
LL |     fn b<T: IntoIterator<Item = i32>>(_: T) {}


error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   |
   |
LL |     c(vec![1, 2].into_iter());
   |       ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `vec![1, 2]`
   |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   |
   |
LL |     fn c(_: impl IntoIterator<Item = i32>) {}


error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   |
   |
LL |     d(vec![1, 2].into_iter());
   |       ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `vec![1, 2]`
   |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   |
LL |         T: IntoIterator<Item = i32>,
   |            ^^^^^^^^^^^^^^^^^^^^^^^^


error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   |
   |
LL |     b(vec![1, 2].into_iter().into_iter());
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`s: `vec![1, 2]`
   |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   |
   |
LL |     fn b<T: IntoIterator<Item = i32>>(_: T) {}


error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   |
   |
LL |     b(vec![1, 2].into_iter().into_iter().into_iter());
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`s: `vec![1, 2]`
   |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   |
   |
LL |     fn b<T: IntoIterator<Item = i32>>(_: T) {}


error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   |
   |
LL |         foo2::<i32, _>([1, 2, 3].into_iter());
   |                        ^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `[1, 2, 3]`
   |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   |
   |
LL |         I: IntoIterator<Item = i32> + Helper<X>,


error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   |
   |
LL |         foo3([1, 2, 3].into_iter());
   |              ^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `[1, 2, 3]`
   |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   |
LL |         I: IntoIterator<Item = i32>,
   |            ^^^^^^^^^^^^^^^^^^^^^^^^


error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   |
   |
LL |         S1.foo([1, 2].into_iter());
   |                ^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `[1, 2]`
   |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   |
   |
LL |             pub fn foo<I: IntoIterator>(&self, _: I) {}


error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   |
   |
LL |         v0.into_iter().interleave_shortest(v1.into_iter());
   |                                            ^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `v1`
   |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   |
LL |                 J: IntoIterator,
   |                    ^^^^^^^^^^^^

---



FAILED TEST: tests/ui/crashes/ice-10148.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/crashes/ice-10148.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/crashes/ice-8250.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.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-8250.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/crashes/ice-8250.stderr` to the actual output
--- tests/ui/crashes/ice-8250.stderr
+++ <stderr output>
+++ <stderr output>
+error: sub-expression diverges
+  --> tests/ui/crashes/ice-8250.rs:2:41
+   |
+LL |     let _ = s[1..].splitn(2, '.').next()?;
+   |
+   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
+   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`
+
---
full stderr:
error: sub-expression diverges
##[error]  --> tests/ui/crashes/ice-8250.rs:2:41
   |
LL |     let _ = s[1..].splitn(2, '.').next()?;
   |
   = note: `-D clippy::diverging-sub-expression` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]`


error: unnecessary use of `splitn`
##[error]  --> 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 2 previous errors


full stdout:
full stdout:



FAILED TEST: tests/ui/items_after_test_module/after_proc_macros.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/items_after_test_module/after_proc_macros.rs:1 failed

full stderr:
previous build failed
previous build failed
full stdout:



FAILED TEST: tests/ui/crashes/used_underscore_binding_macro.rs
command: CLIPPY_CONF_DIR="tests" "/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-d901a432f9b5437d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c39b683b0ce40234.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-a841394a3899e7db.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-b9aa5555d3eeb00c.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-9152caa60d22e5d6.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-6014a4e4c8724228.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-93d7303c6012a33b.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-dd6285fa210e40f1.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f6a8ee4fbadda337.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-7f0d708317b92523.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-5e386b163d38144b.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-b7759248f5057cd2.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--test" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/crashes" "tests/ui/crashes/used_underscore_binding_macro.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/crashes/used_underscore_binding_macro.stderr` to the actual output
--- tests/ui/crashes/used_underscore_binding_macro.stderr
+++ <stderr output>
---



FAILED TEST: tests/ui/missing_const_for_fn/cant_be_const.rs
command: "Aux { aux_file: \"tests/ui/auxiliary/proc_macros.rs\" }"
error: aux build from tests/ui/missing_const_for_fn/cant_be_const.rs:6 failed

full stderr:
previous build failed

@bors
Copy link
Contributor

bors commented Apr 5, 2024

☀️ Try build successful - checks-actions
Build commit: 645bb72 (645bb72776a6a56a1a8f52631a44bd082b2ba509)

@WaffleLapkin
Copy link
Member Author

@craterbot run start=master#385fa9d845dd326c6bbfd58c22244215e431948a end=try#645bb72776a6a56a1a8f52631a44bd082b2ba509 mode=check-only name=absurd-question-mark-desugar crates=https://crater-reports.s3.amazonaws.com/no-never-type-fallback/retry-regressed-list.txt

(using #122955 regressions as the crate list, since this can only break things that #122955 broke)

@craterbot
Copy link
Collaborator

👌 Experiment absurd-question-mark-desugar created and queued.
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 5, 2024
@craterbot
Copy link
Collaborator

🚧 Experiment absurd-question-mark-desugar is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment absurd-question-mark-desugar is completed!
📊 18800 regressed and 0 fixed (97965 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Apr 6, 2024
@Amanieu
Copy link
Member

Amanieu commented Apr 11, 2024

r? compiler

@rustbot rustbot assigned fee1-dead and unassigned Amanieu Apr 11, 2024
@WaffleLapkin WaffleLapkin added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 7, 2024
@traviscross traviscross added the A-maybe-future-edition Something we may consider for a future edition. label Jul 7, 2024
@traviscross
Copy link
Contributor

traviscross commented Jul 10, 2024

@rustbot labels -I-lang-nominated

We discussed this in the triage meeting today. Some people liked this change, and most liked the spirit of it, but there were some concerns. In particular, the many cases like this:

fn result() -> Result<bool, ()> {
-    Err(())?;
+    Err::<(), _>(())?;
     Ok(true)
}

...resulted in much discussion regarding, e.g., the churn and whether the motivation of this proposal makes it worth it. We did not reach consensus here other than that probably no consensus is possible at this time without a revised proposal, so we can unnominate until and unless such a revised proposal is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-maybe-future-edition Something we may consider for a future edition. F-never_type `#![feature(never_type)]` needs-fcp This change is insta-stable, so needs a completed FCP to proceed. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet