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

Rollup of 6 pull requests #102126

Closed
wants to merge 18 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Patiga and others added 18 commits September 20, 2022 02:56
The documentation states that this `ErrorKind` is not used by the
standard library. Instead, `io::ErrorKind::Uncategorized` should be
used.
This avoids toil when changing other functions in `ObligationForest` to take an `OUT` parameter.
In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation.

In the past, `@jackh726` has said we need to be careful about overflow errors:

> Off the top of my head, we definitely should be careful about treating overflow errors the same as
"not implemented for some reason" errors. Otherwise, you could end up with behavior that is
different depending on recursion depth. But, that might be context-dependent.

But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered.
…se-in-std, r=Mark-Simulacrum

Remove use of `io::ErrorKind::Other` in std

The documentation states that this `ErrorKind` is not used by the standard library. Instead, `io::ErrorKind::Uncategorized` should be used.

The two instances are in the unstable API [linux_pidfd](rust-lang#82971).
Make cycle errors recoverable

In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation.

In the past, ``@jackh726`` has said we need to be careful about overflow errors: rust-lang#91430 (comment)

> Off the top of my head, we definitely should be careful about treating overflow errors the same as
"not implemented for some reason" errors. Otherwise, you could end up with behavior that is
different depending on recursion depth. But, that might be context-dependent.

But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered.

Helps with rust-lang#81091.

r? ``@lcnr`` cc ``@matthewjasper``
…eholk

Always print '_, even for erased lifetimes.

Explicit lifetime arguments are now the recommended syntax in rust 2018 and rust 2021.  This PR applies this discipline to rustc itself.
…opaque, r=oli-obk

Skip `Equate` relation in `handle_opaque_type`

r? `@oli-obk`
…jackh726

rustc_transmute: fix big-endian discriminants

I noticed that some new tests were failing in Fedora on s390x only, which usually means there's a problem with big-endian, and sure enough there's a FIXME(`@jswrenn)` for that in `rustc_transmute`. This patch implements the appropriate consideration for target endianness, rather than using native (host) endian.
@rustbot rustbot added 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Sep 22, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Sep 22, 2022

📌 Commit 9402d3d has been approved by Dylan-DPC

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 22, 2022
@bors
Copy link
Contributor

bors commented Sep 22, 2022

⌛ Testing commit 9402d3d with merge 0266cf2e87b60805f6e21c1d43e6b19179f69726...

@bors
Copy link
Contributor

bors commented Sep 22, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 22, 2022
@Dylan-DPC Dylan-DPC closed this Sep 22, 2022
@Dylan-DPC Dylan-DPC deleted the rollup-81cbhq0 branch September 22, 2022 12:53
@Dylan-DPC Dylan-DPC restored the rollup-81cbhq0 branch September 22, 2022 12:53
@Dylan-DPC Dylan-DPC deleted the rollup-81cbhq0 branch September 22, 2022 12:53
@Dylan-DPC Dylan-DPC restored the rollup-81cbhq0 branch September 22, 2022 12:53
@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)

---- compile_test stdout ----
diff of stderr:

 error: calling `to_string` on `&&str`
   --> $DIR/inefficient_to_string.rs:11:21
    |
 LL |     let _: String = rrstr.to_string();
    |                     ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstr).to_string()`
 note: the lint level is defined here
   --> $DIR/inefficient_to_string.rs:2:9
    |
    |
 LL | #![deny(clippy::inefficient_to_string)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: `&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`
 
 error: calling `to_string` on `&&&str`
   --> $DIR/inefficient_to_string.rs:12:21
    |
 LL |     let _: String = rrrstr.to_string();
    |                     ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstr).to_string()`
    |
    = help: `&&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`
 
 error: calling `to_string` on `&&std::string::String`
   --> $DIR/inefficient_to_string.rs:20:21
    |
 LL |     let _: String = rrstring.to_string();
    |                     ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstring).to_string()`
    |
    = help: `&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`
 
 error: calling `to_string` on `&&&std::string::String`
   --> $DIR/inefficient_to_string.rs:21:21
    |
 LL |     let _: String = rrrstring.to_string();
    |                     ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstring).to_string()`
    |
    = help: `&&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`
 
-error: calling `to_string` on `&&std::borrow::Cow<str>`
+error: calling `to_string` on `&&std::borrow::Cow<'_, str>`
   --> $DIR/inefficient_to_string.rs:29:21
    |
 LL |     let _: String = rrcow.to_string();
    |                     ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrcow).to_string()`
    |
-   = help: `&std::borrow::Cow<str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<str>` has a fast specialization of `ToString`
+   = help: `&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`
 
-error: calling `to_string` on `&&&std::borrow::Cow<str>`
+error: calling `to_string` on `&&&std::borrow::Cow<'_, str>`
   --> $DIR/inefficient_to_string.rs:30:21
    |
 LL |     let _: String = rrrcow.to_string();
    |                     ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrcow).to_string()`
    |
-   = help: `&&std::borrow::Cow<str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<str>` has a fast specialization of `ToString`
+   = help: `&&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`
 error: aborting due to 6 previous errors
 
 


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/inefficient_to_string.stage-id.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args inefficient_to_string.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "tests/ui/inefficient_to_string.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/inefficient_to_string.stage-id" "-A" "unused" "--emit=metadata" "-Dwarnings" "-Zui-testing" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--extern" "serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-8323cb9c07857194.so" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-47229815ed3188f9.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-619ac20e364f2b2c.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-cdd893c121eb00e4.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-e0524b7e2611e851.rlib" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c1e1f74e095ae40d.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-26d514bd19819efd.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-ebef35b6fea9c910.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-6d40e81f2d712f90.rlib" "--extern" "rustc_semver=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_semver-963bbd3f89834643.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-4554cde6a1339e03.rlib" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-03f75cdc6d4d3afc.rlib" "--extern" "derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libderive_new-52a645b5b90627c6.so" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-7ff7e3754178d9fd.rlib" "--edition=2021" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/inefficient_to_string.stage-id.aux"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
{"message":"calling `to_string` on `&&str`","code":{"code":"clippy::inefficient_to_string","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":242,"byte_end":259,"line_start":11,"line_end":11,"column_start":21,"column_end":38,"is_primary":true,"text":[{"text":"    let _: String = rrstr.to_string();","highlight_start":21,"highlight_end":38}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":23,"byte_end":52,"line_start":2,"line_end":2,"column_start":9,"column_end":38,"is_primary":true,"text":[{"text":"#![deny(clippy::inefficient_to_string)]","highlight_start":9,"highlight_end":38}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"`&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"try dereferencing the receiver","code":null,"level":"help","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":242,"byte_end":259,"line_start":11,"line_end":11,"column_start":21,"column_end":38,"is_primary":true,"text":[{"text":"    let _: String = rrstr.to_string();","highlight_start":21,"highlight_end":38}],"label":null,"suggested_replacement":"(*rrstr).to_string()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: calling `to_string` on `&&str`\n  --> tests/ui/inefficient_to_string.rs:11:21\n   |\nLL |     let _: String = rrstr.to_string();\n   |                     ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstr).to_string()`\n   |\nnote: the lint level is defined here\n  --> tests/ui/inefficient_to_string.rs:2:9\n   |\nLL | #![deny(clippy::inefficient_to_string)]\n   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n   = help: `&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`\n\n"}
{"message":"calling `to_string` on `&&&str`","code":{"code":"clippy::inefficient_to_string","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":281,"byte_end":299,"line_start":12,"line_end":12,"column_start":21,"column_end":39,"is_primary":true,"text":[{"text":"    let _: String = rrrstr.to_string();","highlight_start":21,"highlight_end":39}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`&&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"try dereferencing the receiver","code":null,"level":"help","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":281,"byte_end":299,"line_start":12,"line_end":12,"column_start":21,"column_end":39,"is_primary":true,"text":[{"text":"    let _: String = rrrstr.to_string();","highlight_start":21,"highlight_end":39}],"label":null,"suggested_replacement":"(**rrrstr).to_string()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: calling `to_string` on `&&&str`\n  --> tests/ui/inefficient_to_string.rs:12:21\n   |\nLL |     let _: String = rrrstr.to_string();\n   |                     ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstr).to_string()`\n   |\n   = help: `&&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`\n\n"}
{"message":"calling `to_string` on `&&std::string::String`","code":{"code":"clippy::inefficient_to_string","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":568,"byte_end":588,"line_start":20,"line_end":20,"column_start":21,"column_end":41,"is_primary":true,"text":[{"text":"    let _: String = rrstring.to_string();","highlight_start":21,"highlight_end":41}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"try dereferencing the receiver","code":null,"level":"help","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":568,"byte_end":588,"line_start":20,"line_end":20,"column_start":21,"column_end":41,"is_primary":true,"text":[{"text":"    let _: String = rrstring.to_string();","highlight_start":21,"highlight_end":41}],"label":null,"suggested_replacement":"(*rrstring).to_string()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: calling `to_string` on `&&std::string::String`\n  --> tests/ui/inefficient_to_string.rs:20:21\n   |\nLL |     let _: String = rrstring.to_string();\n   |                     ^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrstring).to_string()`\n   |\n   = help: `&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`\n\n"}
{"message":"calling `to_string` on `&&&std::string::String`","code":{"code":"clippy::inefficient_to_string","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":610,"byte_end":631,"line_start":21,"line_end":21,"column_start":21,"column_end":42,"is_primary":true,"text":[{"text":"    let _: String = rrrstring.to_string();","highlight_start":21,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`&&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"try dereferencing the receiver","code":null,"level":"help","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":610,"byte_end":631,"line_start":21,"line_end":21,"column_start":21,"column_end":42,"is_primary":true,"text":[{"text":"    let _: String = rrrstring.to_string();","highlight_start":21,"highlight_end":42}],"label":null,"suggested_replacement":"(**rrrstring).to_string()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: calling `to_string` on `&&&std::string::String`\n  --> tests/ui/inefficient_to_string.rs:21:21\n   |\nLL |     let _: String = rrrstring.to_string();\n   |                     ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrstring).to_string()`\n   |\n   = help: `&&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`\n\n"}
{"message":"calling `to_string` on `&&std::borrow::Cow<'_, str>`","code":{"code":"clippy::inefficient_to_string","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":898,"byte_end":915,"line_start":29,"line_end":29,"column_start":21,"column_end":38,"is_primary":true,"text":[{"text":"    let _: String = rrcow.to_string();","highlight_start":21,"highlight_end":38}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"try dereferencing the receiver","code":null,"level":"help","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":898,"byte_end":915,"line_start":29,"line_end":29,"column_start":21,"column_end":38,"is_primary":true,"text":[{"text":"    let _: String = rrcow.to_string();","highlight_start":21,"highlight_end":38}],"label":null,"suggested_replacement":"(*rrcow).to_string()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: calling `to_string` on `&&std::borrow::Cow<'_, str>`\n  --> tests/ui/inefficient_to_string.rs:29:21\n   |\nLL |     let _: String = rrcow.to_string();\n   |                     ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrcow).to_string()`\n   |\n   = help: `&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`\n\n"}
error: test failed, to rerun pass '--test compile-test'
{"message":"calling `to_string` on `&&&std::borrow::Cow<'_, str>`","code":{"code":"clippy::inefficient_to_string","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":937,"byte_end":955,"line_start":30,"line_end":30,"column_start":21,"column_end":39,"is_primary":true,"text":[{"text":"    let _: String = rrrcow.to_string();","highlight_start":21,"highlight_end":39}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`&&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"try dereferencing the receiver","code":null,"level":"help","spans":[{"file_name":"tests/ui/inefficient_to_string.rs","byte_start":937,"byte_end":955,"line_start":30,"line_end":30,"column_start":21,"column_end":39,"is_primary":true,"text":[{"text":"    let _: String = rrrcow.to_string();","highlight_start":21,"highlight_end":39}],"label":null,"suggested_replacement":"(**rrrcow).to_string()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: calling `to_string` on `&&&std::borrow::Cow<'_, str>`\n  --> tests/ui/inefficient_to_string.rs:30:21\n   |\nLL |     let _: String = rrrcow.to_string();\n   |                     ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrcow).to_string()`\n   |\n   = help: `&&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`\n\n"}

------------------------------------------

diff of stderr:
diff of stderr:

-error: this `to_owned` call clones the std::borrow::Cow<str> itself and does not cause the std::borrow::Cow<str> contents to become owned
+error: this `to_owned` call clones the std::borrow::Cow<'_, str> itself and does not cause the std::borrow::Cow<'_, str> contents to become owned
    |
    |
 LL |     let _ = cow.to_owned();
    |             ^^^^^^^^^^^^^^ help: consider using, depending on intent: `cow.clone()` or `cow.into_owned()`
    |
    = note: `-D clippy::suspicious-to-owned` implied by `-D warnings`
 
-error: this `to_owned` call clones the std::borrow::Cow<[char; 3]> itself and does not cause the std::borrow::Cow<[char; 3]> contents to become owned
+error: this `to_owned` call clones the std::borrow::Cow<'_, [char; 3]> itself and does not cause the std::borrow::Cow<'_, [char; 3]> contents to become owned
    |
    |
 LL |     let _ = cow.to_owned();
    |             ^^^^^^^^^^^^^^ help: consider using, depending on intent: `cow.clone()` or `cow.into_owned()`
 
-error: this `to_owned` call clones the std::borrow::Cow<std::vec::Vec<char>> itself and does not cause the std::borrow::Cow<std::vec::Vec<char>> contents to become owned
+error: this `to_owned` call clones the std::borrow::Cow<'_, std::vec::Vec<char>> itself and does not cause the std::borrow::Cow<'_, std::vec::Vec<char>> contents to become owned
    |
    |
 LL |     let _ = cow.to_owned();
    |             ^^^^^^^^^^^^^^ help: consider using, depending on intent: `cow.clone()` or `cow.into_owned()`
 
-error: this `to_owned` call clones the std::borrow::Cow<str> itself and does not cause the std::borrow::Cow<str> contents to become owned
+error: this `to_owned` call clones the std::borrow::Cow<'_, str> itself and does not cause the std::borrow::Cow<'_, str> contents to become owned
    |
    |
 LL |     let _ = cow.to_owned();
    |             ^^^^^^^^^^^^^^ help: consider using, depending on intent: `cow.clone()` or `cow.into_owned()`
 
 error: implicitly cloning a `String` by calling `to_owned` on its dereferenced type
    |
    |
 LL |     let _ = String::from(moo).to_owned();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `String::from(moo).clone()`
    |
    = note: `-D clippy::implicit-clone` implied by `-D warnings`
 
 error: implicitly cloning a `Vec` by calling `to_owned` on its dereferenced type
    |
    |
 LL |     let _ = moos_vec.to_owned();
    |             ^^^^^^^^^^^^^^^^^^^ help: consider using: `moos_vec.clone()`
 error: aborting due to 6 previous errors
 
 


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/suspicious_to_owned.stage-id.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args suspicious_to_owned.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "tests/ui/suspicious_to_owned.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/suspicious_to_owned.stage-id" "-A" "unused" "--emit=metadata" "-Dwarnings" "-Zui-testing" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--extern" "serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-8323cb9c07857194.so" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-47229815ed3188f9.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-619ac20e364f2b2c.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-cdd893c121eb00e4.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-e0524b7e2611e851.rlib" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c1e1f74e095ae40d.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-26d514bd19819efd.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-ebef35b6fea9c910.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-6d40e81f2d712f90.rlib" "--extern" "rustc_semver=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_semver-963bbd3f89834643.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-4554cde6a1339e03.rlib" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-03f75cdc6d4d3afc.rlib" "--extern" "derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libderive_new-52a645b5b90627c6.so" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-7ff7e3754178d9fd.rlib" "--edition=2021" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/suspicious_to_owned.stage-id.aux"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
{"message":"this `to_owned` call clones the std::borrow::Cow<'_, str> itself and does not cause the std::borrow::Cow<'_, str> contents to become owned","code":{"code":"clippy::suspicious_to_owned","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":423,"byte_end":437,"line_start":16,"line_end":16,"column_start":13,"column_end":27,"is_primary":true,"text":[{"text":"    let _ = cow.to_owned();","highlight_start":13,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`-D clippy::suspicious-to-owned` implied by `-D warnings`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"consider using, depending on intent","code":null,"level":"help","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":423,"byte_end":437,"line_start":16,"line_end":16,"column_start":13,"column_end":27,"is_primary":true,"text":[{"text":"    let _ = cow.to_owned();","highlight_start":13,"highlight_end":27}],"label":null,"suggested_replacement":"cow.clone()` or `cow.into_owned()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error: this `to_owned` call clones the std::borrow::Cow<'_, str> itself and does not cause the std::borrow::Cow<'_, str> contents to become owned\n  --> tests/ui/suspicious_to_owned.rs:16:13\n   |\nLL |     let _ = cow.to_owned();\n   |             ^^^^^^^^^^^^^^ help: consider using, depending on intent: `cow.clone()` or `cow.into_owned()`\n   |\n   = note: `-D clippy::suspicious-to-owned` implied by `-D warnings`\n\n"}
{"message":"this `to_owned` call clones the std::borrow::Cow<'_, [char; 3]> itself and does not cause the std::borrow::Cow<'_, [char; 3]> contents to become owned","code":{"code":"clippy::suspicious_to_owned","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":716,"byte_end":730,"line_start":26,"line_end":26,"column_start":13,"column_end":27,"is_primary":true,"text":[{"text":"    let _ = cow.to_owned();","highlight_start":13,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider using, depending on intent","code":null,"level":"help","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":716,"byte_end":730,"line_start":26,"line_end":26,"column_start":13,"column_end":27,"is_primary":true,"text":[{"text":"    let _ = cow.to_owned();","highlight_start":13,"highlight_end":27}],"label":null,"suggested_replacement":"cow.clone()` or `cow.into_owned()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error: this `to_owned` call clones the std::borrow::Cow<'_, [char; 3]> itself and does not cause the std::borrow::Cow<'_, [char; 3]> contents to become owned\n  --> tests/ui/suspicious_to_owned.rs:26:13\n   |\nLL |     let _ = cow.to_owned();\n   |             ^^^^^^^^^^^^^^ help: consider using, depending on intent: `cow.clone()` or `cow.into_owned()`\n\n"}
{"message":"this `to_owned` call clones the std::borrow::Cow<'_, std::vec::Vec<char>> itself and does not cause the std::borrow::Cow<'_, std::vec::Vec<char>> contents to become owned","code":{"code":"clippy::suspicious_to_owned","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":1017,"byte_end":1031,"line_start":36,"line_end":36,"column_start":13,"column_end":27,"is_primary":true,"text":[{"text":"    let _ = cow.to_owned();","highlight_start":13,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider using, depending on intent","code":null,"level":"help","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":1017,"byte_end":1031,"line_start":36,"line_end":36,"column_start":13,"column_end":27,"is_primary":true,"text":[{"text":"    let _ = cow.to_owned();","highlight_start":13,"highlight_end":27}],"label":null,"suggested_replacement":"cow.clone()` or `cow.into_owned()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error: this `to_owned` call clones the std::borrow::Cow<'_, std::vec::Vec<char>> itself and does not cause the std::borrow::Cow<'_, std::vec::Vec<char>> contents to become owned\n  --> tests/ui/suspicious_to_owned.rs:36:13\n   |\nLL |     let _ = cow.to_owned();\n   |             ^^^^^^^^^^^^^^ help: consider using, depending on intent: `cow.clone()` or `cow.into_owned()`\n\n"}
{"message":"this `to_owned` call clones the std::borrow::Cow<'_, str> itself and does not cause the std::borrow::Cow<'_, str> contents to become owned","code":{"code":"clippy::suspicious_to_owned","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":1356,"byte_end":1370,"line_start":46,"line_end":46,"column_start":13,"column_end":27,"is_primary":true,"text":[{"text":"    let _ = cow.to_owned();","highlight_start":13,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider using, depending on intent","code":null,"level":"help","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":1356,"byte_end":1370,"line_start":46,"line_end":46,"column_start":13,"column_end":27,"is_primary":true,"text":[{"text":"    let _ = cow.to_owned();","highlight_start":13,"highlight_end":27}],"label":null,"suggested_replacement":"cow.clone()` or `cow.into_owned()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error: this `to_owned` call clones the std::borrow::Cow<'_, str> itself and does not cause the std::borrow::Cow<'_, str> contents to become owned\n  --> tests/ui/suspicious_to_owned.rs:46:13\n   |\nLL |     let _ = cow.to_owned();\n   |             ^^^^^^^^^^^^^^ help: consider using, depending on intent: `cow.clone()` or `cow.into_owned()`\n\n"}
{"message":"implicitly cloning a `String` by calling `to_owned` on its dereferenced type","code":{"code":"clippy::implicit_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":1822,"byte_end":1850,"line_start":60,"line_end":60,"column_start":13,"column_end":41,"is_primary":true,"text":[{"text":"    let _ = String::from(moo).to_owned();","highlight_start":13,"highlight_end":41}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`-D clippy::implicit-clone` implied by `-D warnings`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"consider using","code":null,"level":"help","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":1822,"byte_end":1850,"line_start":60,"line_end":60,"column_start":13,"column_end":41,"is_primary":true,"text":[{"text":"    let _ = String::from(moo).to_owned();","highlight_start":13,"highlight_end":41}],"label":null,"suggested_replacement":"String::from(moo).clone()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: implicitly cloning a `String` by calling `to_owned` on its dereferenced type\n  --> tests/ui/suspicious_to_owned.rs:60:13\n   |\nLL |     let _ = String::from(moo).to_owned();\n   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `String::from(moo).clone()`\n   |\n   = note: `-D clippy::implicit-clone` implied by `-D warnings`\n\n"}
{"message":"implicitly cloning a `Vec` by calling `to_owned` on its dereferenced type","code":{"code":"clippy::implicit_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":1864,"byte_end":1883,"line_start":61,"line_end":61,"column_start":13,"column_end":32,"is_primary":true,"text":[{"text":"    let _ = moos_vec.to_owned();","highlight_start":13,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider using","code":null,"level":"help","spans":[{"file_name":"tests/ui/suspicious_to_owned.rs","byte_start":1864,"byte_end":1883,"line_start":61,"line_end":61,"column_start":13,"column_end":32,"is_primary":true,"text":[{"text":"    let _ = moos_vec.to_owned();","highlight_start":13,"highlight_end":32}],"label":null,"suggested_replacement":"moos_vec.clone()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: implicitly cloning a `Vec` by calling `to_owned` on its dereferenced type\n  --> tests/ui/suspicious_to_owned.rs:61:13\n   |\nLL |     let _ = moos_vec.to_owned();\n   |             ^^^^^^^^^^^^^^^^^^^ help: consider using: `moos_vec.clone()`\n\n"}

------------------------------------------

diff of stderr:
diff of stderr:

 error: transmute from a pointer type (`*const T`) to a reference type (`&T`)
    |
    |
 LL |     let _: &T = std::mem::transmute(p);
    |                 ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*p`
    |
    = note: `-D clippy::transmute-ptr-to-ref` implied by `-D warnings`
 
 error: transmute from a pointer type (`*mut T`) to a reference type (`&mut T`)
    |
    |
 LL |     let _: &mut T = std::mem::transmute(m);
    |                     ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut *m`
 
 error: transmute from a pointer type (`*mut T`) to a reference type (`&T`)
    |
    |
 LL |     let _: &T = std::mem::transmute(m);
    |                 ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*m`
 
 error: transmute from a pointer type (`*mut T`) to a reference type (`&mut T`)
    |
    |
 LL |     let _: &mut T = std::mem::transmute(p as *mut T);
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut *(p as *mut T)`
 
 error: transmute from a pointer type (`*const U`) to a reference type (`&T`)
    |
    |
 LL |     let _: &T = std::mem::transmute(o);
    |                 ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(o as *const T)`
 
 error: transmute from a pointer type (`*mut U`) to a reference type (`&mut T`)
    |
    |
 LL |     let _: &mut T = std::mem::transmute(om);
    |                     ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut *(om as *mut T)`
 
 error: transmute from a pointer type (`*mut U`) to a reference type (`&T`)
    |
    |
 LL |     let _: &T = std::mem::transmute(om);
    |                 ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(om as *const T)`
 
-error: transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<u8>`)
+error: transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<'_, u8>`)
    |
    |
 LL |     let _: &Foo<u8> = unsafe { std::mem::transmute::<_, &Foo<_>>(raw) };
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*raw.cast::<Foo<_>>()`
 
-error: transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<&u8>`)
+error: transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<'_, &u8>`)
    |
    |
 LL |     let _: &Foo<&u8> = unsafe { std::mem::transmute::<_, &Foo<&_>>(raw) };
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*raw.cast::<Foo<&_>>()`
 
 error: transmute from a pointer type (`*const i32`) to a reference type (`&u8`)
    |
    |
 LL |     unsafe { std::mem::transmute::<_, Bar>(raw) };
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(raw as *const u8)`
 
 error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)
    |
 LL |         0 => std::mem::transmute(x),
 LL |         0 => std::mem::transmute(x),
    |              ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*x.cast::<&u32>()`
 
 error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)
    |
 LL |         1 => std::mem::transmute(y),
 LL |         1 => std::mem::transmute(y),
    |              ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*y.cast::<&u32>()`
 
 error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)
    |
    |
 LL |         2 => std::mem::transmute::<_, &&'b u32>(x),
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*x.cast::<&'b u32>()`
 
 error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)
    |
    |
 LL |         _ => std::mem::transmute::<_, &&'b u32>(y),
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*y.cast::<&'b u32>()`
 
 error: transmute from a pointer type (`*const u32`) to a reference type (`&u32`)
    |
    |
 LL |     let _: &u32 = std::mem::transmute(a);
    |                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*a`
 
 error: transmute from a pointer type (`*const u32`) to a reference type (`&u32`)
    |
    |
 LL |     let _: &u32 = std::mem::transmute::<_, &u32>(a);
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*a.cast::<u32>()`
 
 error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)
    |
 LL |         0 => std::mem::transmute(x),
 LL |         0 => std::mem::transmute(x),
    |              ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*x.cast::<&u32>()`
 
 error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)
    |
    |
 LL |         _ => std::mem::transmute::<_, &&'b u32>(x),
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*x.cast::<&'b u32>()`
 
 error: transmute from a pointer type (`*const u32`) to a reference type (`&u32`)
    |
    |
 LL |     let _: &u32 = std::mem::transmute(a);
    |                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*a`
 
 error: transmute from a pointer type (`*const u32`) to a reference type (`&u32`)
    |
    |
 LL |     let _: &u32 = std::mem::transmute::<_, &u32>(a);
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(a as *const u32)`
 
 error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)
    |
 LL |         0 => std::mem::transmute(x),
 LL |         0 => std::mem::transmute(x),
    |              ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(x as *const () as *const &u32)`
 
 error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)
    |
    |
 LL |         _ => std::mem::transmute::<_, &&'b u32>(x),
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(x as *const () as *const &'b u32)`
 error: aborting due to 22 previous errors
 
 


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/transmute_ptr_to_ref.stage-id.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args transmute_ptr_to_ref.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "tests/ui/transmute_ptr_to_ref.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/transmute_ptr_to_ref.stage-id" "-A" "unused" "--emit=metadata" "-Dwarnings" "-Zui-testing" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--extern" "serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-8323cb9c07857194.so" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-47229815ed3188f9.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-619ac20e364f2b2c.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-cdd893c121eb00e4.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-e0524b7e2611e851.rlib" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c1e1f74e095ae40d.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-26d514bd19819efd.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-ebef35b6fea9c910.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-6d40e81f2d712f90.rlib" "--extern" "rustc_semver=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_semver-963bbd3f89834643.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-4554cde6a1339e03.rlib" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-03f75cdc6d4d3afc.rlib" "--extern" "derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libderive_new-52a645b5b90627c6.so" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-7ff7e3754178d9fd.rlib" "--edition=2021" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/transmute_ptr_to_ref.stage-id.aux"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
{"message":"transmute from a pointer type (`*const T`) to a reference type (`&T`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":228,"byte_end":250,"line_start":8,"line_end":8,"column_start":17,"column_end":39,"is_primary":true,"text":[{"text":"    let _: &T = std::mem::transmute(p);","highlight_start":17,"highlight_end":39}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`-D clippy::transmute-ptr-to-ref` implied by `-D warnings`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":228,"byte_end":250,"line_start":8,"line_end":8,"column_start":17,"column_end":39,"is_primary":true,"text":[{"text":"    let _: &T = std::mem::transmute(p);","highlight_start":17,"highlight_end":39}],"label":null,"suggested_replacement":"&*p","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const T`) to a reference type (`&T`)\n  --> tests/ui/transmute_ptr_to_ref.rs:8:17\n   |\nLL |     let _: &T = std::mem::transmute(p);\n   |                 ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*p`\n   |\n   = note: `-D clippy::transmute-ptr-to-ref` implied by `-D warnings`\n\n"}
{"message":"transmute from a pointer type (`*mut T`) to a reference type (`&mut T`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":294,"byte_end":316,"line_start":11,"line_end":11,"column_start":21,"column_end":43,"is_primary":true,"text":[{"text":"    let _: &mut T = std::mem::transmute(m);","highlight_start":21,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":294,"byte_end":316,"line_start":11,"line_end":11,"column_start":21,"column_end":43,"is_primary":true,"text":[{"text":"    let _: &mut T = std::mem::transmute(m);","highlight_start":21,"highlight_end":43}],"label":null,"suggested_replacement":"&mut *m","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*mut T`) to a reference type (`&mut T`)\n  --> tests/ui/transmute_ptr_to_ref.rs:11:21\n   |\nLL |     let _: &mut T = std::mem::transmute(m);\n   |                     ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut *m`\n\n"}
{"message":"transmute from a pointer type (`*mut T`) to a reference type (`&T`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":364,"byte_end":386,"line_start":14,"line_end":14,"column_start":17,"column_end":39,"is_primary":true,"text":[{"text":"    let _: &T = std::mem::transmute(m);","highlight_start":17,"highlight_end":39}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":364,"byte_end":386,"line_start":14,"line_end":14,"column_start":17,"column_end":39,"is_primary":true,"text":[{"text":"    let _: &T = std::mem::transmute(m);","highlight_start":17,"highlight_end":39}],"label":null,"suggested_replacement":"&*m","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*mut T`) to a reference type (`&T`)\n  --> tests/ui/transmute_ptr_to_ref.rs:14:17\n   |\nLL |     let _: &T = std::mem::transmute(m);\n   |                 ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*m`\n\n"}
{"message":"transmute from a pointer type (`*mut T`) to a reference type (`&mut T`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":430,"byte_end":462,"line_start":17,"line_end":17,"column_start":21,"column_end":53,"is_primary":true,"text":[{"text":"    let _: &mut T = std::mem::transmute(p as *mut T);","highlight_start":21,"highlight_end":53}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":430,"byte_end":462,"line_start":17,"line_end":17,"column_start":21,"column_end":53,"is_primary":true,"text":[{"text":"    let _: &mut T = std::mem::transmute(p as *mut T);","highlight_start":21,"highlight_end":53}],"label":null,"suggested_replacement":"&mut *(p as *mut T)","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*mut T`) to a reference type (`&mut T`)\n  --> tests/ui/transmute_ptr_to_ref.rs:17:21\n   |\nLL |     let _: &mut T = std::mem::transmute(p as *mut T);\n   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut *(p as *mut T)`\n\n"}
{"message":"transmute from a pointer type (`*const U`) to a reference type (`&T`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":514,"byte_end":536,"line_start":20,"line_end":20,"column_start":17,"column_end":39,"is_primary":true,"text":[{"text":"    let _: &T = std::mem::transmute(o);","highlight_start":17,"highlight_end":39}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":514,"byte_end":536,"line_start":20,"line_end":20,"column_start":17,"column_end":39,"is_primary":true,"text":[{"text":"    let _: &T = std::mem::transmute(o);","highlight_start":17,"highlight_end":39}],"label":null,"suggested_replacement":"&*(o as *const T)","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const U`) to a reference type (`&T`)\n  --> tests/ui/transmute_ptr_to_ref.rs:20:17\n   |\nLL |     let _: &T = std::mem::transmute(o);\n   |                 ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(o as *const T)`\n\n"}
{"message":"transmute from a pointer type (`*mut U`) to a reference type (`&mut T`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":594,"byte_end":617,"line_start":23,"line_end":23,"column_start":21,"column_end":44,"is_primary":true,"text":[{"text":"    let _: &mut T = std::mem::transmute(om);","highlight_start":21,"highlight_end":44}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":594,"byte_end":617,"line_start":23,"line_end":23,"column_start":21,"column_end":44,"is_primary":true,"text":[{"text":"    let _: &mut T = std::mem::transmute(om);","highlight_start":21,"highlight_end":44}],"label":null,"suggested_replacement":"&mut *(om as *mut T)","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*mut U`) to a reference type (`&mut T`)\n  --> tests/ui/transmute_ptr_to_ref.rs:23:21\n   |\nLL |     let _: &mut T = std::mem::transmute(om);\n   |                     ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut *(om as *mut T)`\n\n"}
{"message":"transmute from a pointer type (`*mut U`) to a reference type (`&T`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":678,"byte_end":701,"line_start":26,"line_end":26,"column_start":17,"column_end":40,"is_primary":true,"text":[{"text":"    let _: &T = std::mem::transmute(om);","highlight_start":17,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":678,"byte_end":701,"line_start":26,"line_end":26,"column_start":17,"column_end":40,"is_primary":true,"text":[{"text":"    let _: &T = std::mem::transmute(om);","highlight_start":17,"highlight_end":40}],"label":null,"suggested_replacement":"&*(om as *const T)","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*mut U`) to a reference type (`&T`)\n  --> tests/ui/transmute_ptr_to_ref.rs:26:17\n   |\nLL |     let _: &T = std::mem::transmute(om);\n   |                 ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(om as *const T)`\n\n"}
{"message":"transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<'_, u8>`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":874,"byte_end":912,"line_start":36,"line_end":36,"column_start":32,"column_end":70,"is_primary":true,"text":[{"text":"    let _: &Foo<u8> = unsafe { std::mem::transmute::<_, &Foo<_>>(raw) };","highlight_start":32,"highlight_end":70}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":874,"byte_end":912,"line_start":36,"line_end":36,"column_start":32,"column_end":70,"is_primary":true,"text":[{"text":"    let _: &Foo<u8> = unsafe { std::mem::transmute::<_, &Foo<_>>(raw) };","highlight_start":32,"highlight_end":70}],"label":null,"suggested_replacement":"&*raw.cast::<Foo<_>>()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<'_, u8>`)\n  --> tests/ui/transmute_ptr_to_ref.rs:36:32\n   |\nLL |     let _: &Foo<u8> = unsafe { std::mem::transmute::<_, &Foo<_>>(raw) };\n   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*raw.cast::<Foo<_>>()`\n\n"}
{"message":"transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<'_, &u8>`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":949,"byte_end":988,"line_start":38,"line_end":38,"column_start":33,"column_end":72,"is_primary":true,"text":[{"text":"    let _: &Foo<&u8> = unsafe { std::mem::transmute::<_, &Foo<&_>>(raw) };","highlight_start":33,"highlight_end":72}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":949,"byte_end":988,"line_start":38,"line_end":38,"column_start":33,"column_end":72,"is_primary":true,"text":[{"text":"    let _: &Foo<&u8> = unsafe { std::mem::transmute::<_, &Foo<&_>>(raw) };","highlight_start":33,"highlight_end":72}],"label":null,"suggested_replacement":"&*raw.cast::<Foo<&_>>()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const i32`) to a reference type (`&_issue1231::Foo<'_, &u8>`)\n  --> tests/ui/transmute_ptr_to_ref.rs:38:33\n   |\nLL |     let _: &Foo<&u8> = unsafe { std::mem::transmute::<_, &Foo<&_>>(raw) };\n   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*raw.cast::<Foo<&_>>()`\n\n"}
{"message":"transmute from a pointer type (`*const i32`) to a reference type (`&u8`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1065,"byte_end":1099,"line_start":42,"line_end":42,"column_start":14,"column_end":48,"is_primary":true,"text":[{"text":"    unsafe { std::mem::transmute::<_, Bar>(raw) };","highlight_start":14,"highlight_end":48}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1065,"byte_end":1099,"line_start":42,"line_end":42,"column_start":14,"column_end":48,"is_primary":true,"text":[{"text":"    unsafe { std::mem::transmute::<_, Bar>(raw) };","highlight_start":14,"highlight_end":48}],"label":null,"suggested_replacement":"&*(raw as *const u8)","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const i32`) to a reference type (`&u8`)\n  --> tests/ui/transmute_ptr_to_ref.rs:42:14\n   |\nLL |     unsafe { std::mem::transmute::<_, Bar>(raw) };\n   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(raw as *const u8)`\n\n"}
{"message":"transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1221,"byte_end":1243,"line_start":47,"line_end":47,"column_start":14,"column_end":36,"is_primary":true,"text":[{"text":"        0 => std::mem::transmute(x),","highlight_start":14,"highlight_end":36}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1221,"byte_end":1243,"line_start":47,"line_end":47,"column_start":14,"column_end":36,"is_primary":true,"text":[{"text":"        0 => std::mem::transmute(x),","highlight_start":14,"highlight_end":36}],"label":null,"suggested_replacement":"&*x.cast::<&u32>()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:47:14\n   |\nLL |         0 => std::mem::transmute(x),\n   |              ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*x.cast::<&u32>()`\n\n"}
{"message":"transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1258,"byte_end":1280,"line_start":48,"line_end":48,"column_start":14,"column_end":36,"is_primary":true,"text":[{"text":"        1 => std::mem::transmute(y),","highlight_start":14,"highlight_end":36}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1258,"byte_end":1280,"line_start":48,"line_end":48,"column_start":14,"column_end":36,"is_primary":true,"text":[{"text":"        1 => std::mem::transmute(y),","highlight_start":14,"highlight_end":36}],"label":null,"suggested_replacement":"&*y.cast::<&u32>()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:48:14\n   |\nLL |         1 => std::mem::transmute(y),\n   |              ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*y.cast::<&u32>()`\n\n"}
{"message":"transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1295,"byte_end":1332,"line_start":49,"line_end":49,"column_start":14,"column_end":51,"is_primary":true,"text":[{"text":"        2 => std::mem::transmute::<_, &&'b u32>(x),","highlight_start":14,"highlight_end":51}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1295,"byte_end":1332,"line_start":49,"line_end":49,"column_start":14,"column_end":51,"is_primary":true,"text":[{"text":"        2 => std::mem::transmute::<_, &&'b u32>(x),","highlight_start":14,"highlight_end":51}],"label":null,"suggested_replacement":"&*x.cast::<&'b u32>()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:49:14\n   |\nLL |         2 => std::mem::transmute::<_, &&'b u32>(x),\n   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*x.cast::<&'b u32>()`\n\n"}
{"message":"transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1347,"byte_end":1384,"line_start":50,"line_end":50,"column_start":14,"column_end":51,"is_primary":true,"text":[{"text":"        _ => std::mem::transmute::<_, &&'b u32>(y),","highlight_start":14,"highlight_end":51}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1347,"byte_end":1384,"line_start":50,"line_end":50,"column_start":14,"column_end":51,"is_primary":true,"text":[{"text":"        _ => std::mem::transmute::<_, &&'b u32>(y),","highlight_start":14,"highlight_end":51}],"label":null,"suggested_replacement":"&*y.cast::<&'b u32>()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:50:14\n   |\nLL |         _ => std::mem::transmute::<_, &&'b u32>(y),\n   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*y.cast::<&'b u32>()`\n\n"}
{"message":"transmute from a pointer type (`*const u32`) to a reference type (`&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1561,"byte_end":1583,"line_start":58,"line_end":58,"column_start":19,"column_end":41,"is_primary":true,"text":[{"text":"    let _: &u32 = std::mem::transmute(a);","highlight_start":19,"highlight_end":41}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1561,"byte_end":1583,"line_start":58,"line_end":58,"column_start":19,"column_end":41,"is_primary":true,"text":[{"text":"    let _: &u32 = std::mem::transmute(a);","highlight_start":19,"highlight_end":41}],"label":null,"suggested_replacement":"&*a","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const u32`) to a reference type (`&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:58:19\n   |\nLL |     let _: &u32 = std::mem::transmute(a);\n   |                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*a`\n\n"}
{"message":"transmute from a pointer type (`*const u32`) to a reference type (`&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1603,"byte_end":1636,"line_start":59,"line_end":59,"column_start":19,"column_end":52,"is_primary":true,"text":[{"text":"    let _: &u32 = std::mem::transmute::<_, &u32>(a);","highlight_start":19,"highlight_end":52}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1603,"byte_end":1636,"line_start":59,"line_end":59,"column_start":19,"column_end":52,"is_primary":true,"text":[{"text":"    let _: &u32 = std::mem::transmute::<_, &u32>(a);","highlight_start":19,"highlight_end":52}],"label":null,"suggested_replacement":"&*a.cast::<u32>()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const u32`) to a reference type (`&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:59:19\n   |\nLL |     let _: &u32 = std::mem::transmute::<_, &u32>(a);\n   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*a.cast::<u32>()`\n\n"}
{"message":"transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1665,"byte_end":1687,"line_start":61,"line_end":61,"column_start":14,"column_end":36,"is_primary":true,"text":[{"text":"        0 => std::mem::transmute(x),","highlight_start":14,"highlight_end":36}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1665,"byte_end":1687,"line_start":61,"line_end":61,"column_start":14,"column_end":36,"is_primary":true,"text":[{"text":"        0 => std::mem::transmute(x),","highlight_start":14,"highlight_end":36}],"label":null,"suggested_replacement":"&*x.cast::<&u32>()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:61:14\n   |\nLL |         0 => std::mem::transmute(x),\n   |              ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*x.cast::<&u32>()`\n\n"}
{"message":"transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1702,"byte_end":1739,"line_start":62,"line_end":62,"column_start":14,"column_end":51,"is_primary":true,"text":[{"text":"        _ => std::mem::transmute::<_, &&'b u32>(x),","highlight_start":14,"highlight_end":51}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1702,"byte_end":1739,"line_start":62,"line_end":62,"column_start":14,"column_end":51,"is_primary":true,"text":[{"text":"        _ => std::mem::transmute::<_, &&'b u32>(x),","highlight_start":14,"highlight_end":51}],"label":null,"suggested_replacement":"&*x.cast::<&'b u32>()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:62:14\n   |\nLL |         _ => std::mem::transmute::<_, &&'b u32>(x),\n   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*x.cast::<&'b u32>()`\n\n"}
{"message":"transmute from a pointer type (`*const u32`) to a reference type (`&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1916,"byte_end":1938,"line_start":70,"line_end":70,"column_start":19,"column_end":41,"is_primary":true,"text":[{"text":"    let _: &u32 = std::mem::transmute(a);","highlight_start":19,"highlight_end":41}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1916,"byte_end":1938,"line_start":70,"line_end":70,"column_start":19,"column_end":41,"is_primary":true,"text":[{"text":"    let _: &u32 = std::mem::transmute(a);","highlight_start":19,"highlight_end":41}],"label":null,"suggested_replacement":"&*a","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const u32`) to a reference type (`&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:70:19\n   |\nLL |     let _: &u32 = std::mem::transmute(a);\n   |                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*a`\n\n"}
{"message":"transmute from a pointer type (`*const u32`) to a reference type (`&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1958,"byte_end":1991,"line_start":71,"line_end":71,"column_start":19,"column_end":52,"is_primary":true,"text":[{"text":"    let _: &u32 = std::mem::transmute::<_, &u32>(a);","highlight_start":19,"highlight_end":52}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":1958,"byte_end":1991,"line_start":71,"line_end":71,"column_start":19,"column_end":52,"is_primary":true,"text":[{"text":"    let _: &u32 = std::mem::transmute::<_, &u32>(a);","highlight_start":19,"highlight_end":52}],"label":null,"suggested_replacement":"&*(a as *const u32)","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const u32`) to a reference type (`&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:71:19\n   |\nLL |     let _: &u32 = std::mem::transmute::<_, &u32>(a);\n   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(a as *const u32)`\n\n"}
{"message":"transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":2020,"byte_end":2042,"line_start":73,"line_end":73,"column_start":14,"column_end":36,"is_primary":true,"text":[{"text":"        0 => std::mem::transmute(x),","highlight_start":14,"highlight_end":36}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":2020,"byte_end":2042,"line_start":73,"line_end":73,"column_start":14,"column_end":36,"is_primary":true,"text":[{"text":"        0 => std::mem::transmute(x),","highlight_start":14,"highlight_end":36}],"label":null,"suggested_replacement":"&*(x as *const () as *const &u32)","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:73:14\n   |\nLL |         0 => std::mem::transmute(x),\n   |              ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(x as *const () as *const &u32)`\n\n"}
{"message":"transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)","code":{"code":"clippy::transmute_ptr_to_ref","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":2057,"byte_end":2094,"line_start":74,"line_end":74,"column_start":14,"column_end":51,"is_primary":true,"text":[{"text":"        _ => std::mem::transmute::<_, &&'b u32>(x),","highlight_start":14,"highlight_end":51}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"tests/ui/transmute_ptr_to_ref.rs","byte_start":2057,"byte_end":2094,"line_start":74,"line_end":74,"column_start":14,"column_end":51,"is_primary":true,"text":[{"text":"        _ => std::mem::transmute::<_, &&'b u32>(x),","highlight_start":14,"highlight_end":51}],"label":null,"suggested_replacement":"&*(x as *const () as *const &'b u32)","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: transmute from a pointer type (`*const &u32`) to a reference type (`&&u32`)\n  --> tests/ui/transmute_ptr_to_ref.rs:74:14\n   |\nLL |         _ => std::mem::transmute::<_, &&'b u32>(x),\n   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(x as *const () as *const &'b u32)`\n\n"}

------------------------------------------

diff of stderr:
diff of stderr:

 error: useless conversion to the same type: `T`
   --> $DIR/useless_conversion.rs:7:13
    |
 LL |     let _ = T::from(val);
    |             ^^^^^^^^^^^^ help: consider removing `T::from()`: `val`
 note: the lint level is defined here
   --> $DIR/useless_conversion.rs:3:9
    |
    |
 LL | #![deny(clippy::useless_conversion)]
 
 error: useless conversion to the same type: `T`
   --> $DIR/useless_conversion.rs:8:5
    |
    |
 LL |     val.into()
    |     ^^^^^^^^^^ help: consider removing `.into()`: `val`
 error: useless conversion to the same type: `i32`
   --> $DIR/useless_conversion.rs:20:22
    |
    |
 LL |         let _: i32 = 0i32.into();
    |                      ^^^^^^^^^^^ help: consider removing `.into()`: `0i32`
 error: useless conversion to the same type: `std::string::String`
   --> $DIR/useless_conversion.rs:61: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`
   --> $DIR/useless_conversion.rs:62: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`
   --> $DIR/useless_conversion.rs:63: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`
   --> $DIR/useless_conversion.rs:64: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: useless conversion to the same type: `std::str::Lines<'_>`
   --> $DIR/useless_conversion.rs:65:13
    |
    |
 LL |     let _ = "".lines().into_iter();
    |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `"".lines()`
 error: useless conversion to the same type: `std::vec::IntoIter<i32>`
   --> $DIR/useless_conversion.rs:66: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`
   --> $DIR/useless_conversion.rs:67:21
    |
    |
 LL |     let _: String = format!("Hello {}", "world").into();
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Hello {}", "world")`
 error: useless conversion to the same type: `i32`
   --> $DIR/useless_conversion.rs:72: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: aborting due to 14 previous errors
 
 


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/useless_conversion.stage-id.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args useless_conversion.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "tests/ui/useless_conversion.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/useless_conversion.stage-id" "-A" "unused" "--emit=metadata" "-Dwarnings" "-Zui-testing" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--extern" "serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-8323cb9c07857194.so" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-47229815ed3188f9.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-619ac20e364f2b2c.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-cdd893c121eb00e4.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-e0524b7e2611e851.rlib" "--extern" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-c1e1f74e095ae40d.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-26d514bd19819efd.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-ebef35b6fea9c910.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-6d40e81f2d712f90.rlib" "--extern" "rustc_semver=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_semver-963bbd3f89834643.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-4554cde6a1339e03.rlib" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-03f75cdc6d4d3afc.rlib" "--extern" "derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libderive_new-52a645b5b90627c6.so" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-7ff7e3754178d9fd.rlib" "--edition=2021" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/useless_conversion.stage-id.aux"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
{"message":"useless conversion to the same type: `T`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":143,"byte_end":155,"line_start":7,"line_end":7,"column_start":13,"column_end":25,"is_primary":true,"text":[{"text":"    let _ = T::from(val);","highlight_start":13,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":24,"byte_end":50,"line_start":3,"line_end":3,"column_start":9,"column_end":35,"is_primary":true,"text":[{"text":"#![deny(clippy::useless_conversion)]","highlight_start":9,"highlight_end":35}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"consider removing `T::from()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":143,"byte_end":155,"line_start":7,"line_end":7,"column_start":13,"column_end":25,"is_primary":true,"text":[{"text":"    let _ = T::from(val);","highlight_start":13,"highlight_end":25}],"label":null,"suggested_replacement":"val","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `T`\n  --> tests/ui/useless_conversion.rs:7:13\n   |\nLL |     let _ = T::from(val);\n   |             ^^^^^^^^^^^^ help: consider removing `T::from()`: `val`\n   |\nnote: the lint level is defined here\n  --> tests/ui/useless_conversion.rs:3:9\n   |\nLL | #![deny(clippy::useless_conversion)]\n   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
{"message":"useless conversion to the same type: `T`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":161,"byte_end":171,"line_start":8,"line_end":8,"column_start":5,"column_end":15,"is_primary":true,"text":[{"text":"    val.into()","highlight_start":5,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `.into()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":161,"byte_end":171,"line_start":8,"line_end":8,"column_start":5,"column_end":15,"is_primary":true,"text":[{"text":"    val.into()","highlight_start":5,"highlight_end":15}],"label":null,"suggested_replacement":"val","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `T`\n  --> tests/ui/useless_conversion.rs:8:5\n   |\nLL |     val.into()\n   |     ^^^^^^^^^^ help: consider removing `.into()`: `val`\n\n"}
{"message":"useless conversion to the same type: `i32`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":410,"byte_end":421,"line_start":20,"line_end":20,"column_start":22,"column_end":33,"is_primary":true,"text":[{"text":"        let _: i32 = 0i32.into();","highlight_start":22,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `.into()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":410,"byte_end":421,"line_start":20,"line_end":20,"column_start":22,"column_end":33,"is_primary":true,"text":[{"text":"        let _: i32 = 0i32.into();","highlight_start":22,"highlight_end":33}],"label":null,"suggested_replacement":"0i32","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `i32`\n  --> tests/ui/useless_conversion.rs:20:22\n   |\nLL |         let _: i32 = 0i32.into();\n   |                      ^^^^^^^^^^^ help: consider removing `.into()`: `0i32`\n\n"}
{"message":"useless conversion to the same type: `std::string::String`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1285,"byte_end":1309,"line_start":61,"line_end":61,"column_start":21,"column_end":45,"is_primary":true,"text":[{"text":"    let _: String = \"foo\".to_string().into();","highlight_start":21,"highlight_end":45}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `.into()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1285,"byte_end":1309,"line_start":61,"line_end":61,"column_start":21,"column_end":45,"is_primary":true,"text":[{"text":"    let _: String = \"foo\".to_string().into();","highlight_start":21,"highlight_end":45}],"label":null,"suggested_replacement":"\"foo\".to_string()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `std::string::String`\n  --> tests/ui/useless_conversion.rs:61:21\n   |\nLL |     let _: String = \"foo\".to_string().into();\n   |                     ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `\"foo\".to_string()`\n\n"}
{"message":"useless conversion to the same type: `std::string::String`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1331,"byte_end":1360,"line_start":62,"line_end":62,"column_start":21,"column_end":50,"is_primary":true,"text":[{"text":"    let _: String = From::from(\"foo\".to_string());","highlight_start":21,"highlight_end":50}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `From::from()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1331,"byte_end":1360,"line_start":62,"line_end":62,"column_start":21,"column_end":50,"is_primary":true,"text":[{"text":"    let _: String = From::from(\"foo\".to_string());","highlight_start":21,"highlight_end":50}],"label":null,"suggested_replacement":"\"foo\".to_string()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `std::string::String`\n  --> tests/ui/useless_conversion.rs:62:21\n   |\nLL |     let _: String = From::from(\"foo\".to_string());\n   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `From::from()`: `\"foo\".to_string()`\n\n"}
{"message":"useless conversion to the same type: `std::string::String`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1374,"byte_end":1405,"line_start":63,"line_end":63,"column_start":13,"column_end":44,"is_primary":true,"text":[{"text":"    let _ = String::from(\"foo\".to_string());","highlight_start":13,"highlight_end":44}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `String::from()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1374,"byte_end":1405,"line_start":63,"line_end":63,"column_start":13,"column_end":44,"is_primary":true,"text":[{"text":"    let _ = String::from(\"foo\".to_string());","highlight_start":13,"highlight_end":44}],"label":null,"suggested_replacement":"\"foo\".to_string()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `std::string::String`\n  --> tests/ui/useless_conversion.rs:63:13\n   |\nLL |     let _ = String::from(\"foo\".to_string());\n   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `\"foo\".to_string()`\n\n"}
{"message":"useless conversion to the same type: `std::string::String`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1419,"byte_end":1457,"line_start":64,"line_end":64,"column_start":13,"column_end":51,"is_primary":true,"text":[{"text":"    let _ = String::from(format!(\"A: {:04}\", 123));","highlight_start":13,"highlight_end":51}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `String::from()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1419,"byte_end":1457,"line_start":64,"line_end":64,"column_start":13,"column_end":51,"is_primary":true,"text":[{"text":"    let _ = String::from(format!(\"A: {:04}\", 123));","highlight_start":13,"highlight_end":51}],"label":null,"suggested_replacement":"format!(\"A: {:04}\", 123)","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `std::string::String`\n  --> tests/ui/useless_conversion.rs:64:13\n   |\nLL |     let _ = String::from(format!(\"A: {:04}\", 123));\n   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!(\"A: {:04}\", 123)`\n\n"}
{"message":"useless conversion to the same type: `std::str::Lines<'_>`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1471,"byte_end":1493,"line_start":65,"line_end":65,"column_start":13,"column_end":35,"is_primary":true,"text":[{"text":"    let _ = \"\".lines().into_iter();","highlight_start":13,"highlight_end":35}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `.into_iter()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1471,"byte_end":1493,"line_start":65,"line_end":65,"column_start":13,"column_end":35,"is_primary":true,"text":[{"text":"    let _ = \"\".lines().into_iter();","highlight_start":13,"highlight_end":35}],"label":null,"suggested_replacement":"\"\".lines()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `std::str::Lines<'_>`\n  --> tests/ui/useless_conversion.rs:65:13\n   |\nLL |     let _ = \"\".lines().into_iter();\n   |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `\"\".lines()`\n\n"}
{"message":"useless conversion to the same type: `std::vec::IntoIter<i32>`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1507,"byte_end":1544,"line_start":66,"line_end":66,"column_start":13,"column_end":50,"is_primary":true,"text":[{"text":"    let _ = vec![1, 2, 3].into_iter().into_iter();","highlight_start":13,"highlight_end":50}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `.into_iter()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1507,"byte_end":1544,"line_start":66,"line_end":66,"column_start":13,"column_end":50,"is_primary":true,"text":[{"text":"    let _ = vec![1, 2, 3].into_iter().into_iter();","highlight_start":13,"highlight_end":50}],"label":null,"suggested_replacement":"vec![1, 2, 3].into_iter()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `std::vec::IntoIter<i32>`\n  --> tests/ui/useless_conversion.rs:66:13\n   |\nLL |     let _ = vec![1, 2, 3].into_iter().into_iter();\n   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `vec![1, 2, 3].into_iter()`\n\n"}
{"message":"useless conversion to the same type: `std::string::String`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1566,"byte_end":1601,"line_start":67,"line_end":67,"column_start":21,"column_end":56,"is_primary":true,"text":[{"text":"    let _: String = format!(\"Hello {}\", \"world\").into();","highlight_start":21,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `.into()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1566,"byte_end":1601,"line_start":67,"line_end":67,"column_start":21,"column_end":56,"is_primary":true,"text":[{"text":"    let _: String = format!(\"Hello {}\", \"world\").into();","highlight_start":21,"highlight_end":56}],"label":null,"suggested_replacement":"format!(\"Hello {}\", \"world\")","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `std::string::String`\n  --> tests/ui/useless_conversion.rs:67:21\n   |\nLL |     let _: String = format!(\"Hello {}\", \"world\").into();\n   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!(\"Hello {}\", \"world\")`\n\n"}
{"message":"useless conversion to the same type: `i32`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1722,"byte_end":1738,"line_start":72,"line_end":72,"column_start":13,"column_end":29,"is_primary":true,"text":[{"text":"    let _ = i32::from(a + b) * 3;","highlight_start":13,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `i32::from()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1722,"byte_end":1738,"line_start":72,"line_end":72,"column_start":13,"column_end":29,"is_primary":true,"text":[{"text":"    let _ = i32::from(a + b) * 3;","highlight_start":13,"highlight_end":29}],"label":null,"suggested_replacement":"(a + b)","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `i32`\n  --> tests/ui/useless_conversion.rs:72:13\n   |\nLL |     let _ = i32::from(a + b) * 3;\n   |             ^^^^^^^^^^^^^^^^ help: consider removing `i32::from()`: `(a + b)`\n\n"}
{"message":"useless conversion to the same type: `Foo<'a'>`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1871,"byte_end":1880,"line_start":78,"line_end":78,"column_start":23,"column_end":32,"is_primary":true,"text":[{"text":"    let _: Foo<'a'> = s2.into();","highlight_start":23,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `.into()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1871,"byte_end":1880,"line_start":78,"line_end":78,"column_start":23,"column_end":32,"is_primary":true,"text":[{"text":"    let _: Foo<'a'> = s2.into();","highlight_start":23,"highlight_end":32}],"label":null,"suggested_replacement":"s2","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `Foo<'a'>`\n  --> tests/ui/useless_conversion.rs:78:23\n   |\nLL |     let _: Foo<'a'> = s2.into();\n   |                       ^^^^^^^^^ help: consider removing `.into()`: `s2`\n\n"}
{"message":"useless conversion to the same type: `Foo<'a'>`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1922,"byte_end":1942,"line_start":80,"line_end":80,"column_start":13,"column_end":33,"is_primary":true,"text":[{"text":"    let _ = Foo::<'a'>::from(s3);","highlight_start":13,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `Foo::<'a'>::from()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1922,"byte_end":1942,"line_start":80,"line_end":80,"column_start":13,"column_end":33,"is_primary":true,"text":[{"text":"    let _ = Foo::<'a'>::from(s3);","highlight_start":13,"highlight_end":33}],"label":null,"suggested_replacement":"s3","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `Foo<'a'>`\n  --> tests/ui/useless_conversion.rs:80:13\n   |\nLL |     let _ = Foo::<'a'>::from(s3);\n   |             ^^^^^^^^^^^^^^^^^^^^ help: consider removing `Foo::<'a'>::from()`: `s3`\n\n"}
{"message":"useless conversion to the same type: `std::vec::IntoIter<Foo<'a'>>`","code":{"code":"clippy::useless_conversion","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1984,"byte_end":2024,"line_start":82,"line_end":82,"column_start":13,"column_end":53,"is_primary":true,"text":[{"text":"    let _ = vec![s4, s4, s4].into_iter().into_iter();","highlight_start":13,"highlight_end":53}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider removing `.into_iter()`","code":null,"level":"help","spans":[{"file_name":"tests/ui/useless_conversion.rs","byte_start":1984,"byte_end":2024,"line_start":82,"line_end":82,"column_start":13,"column_end":53,"is_primary":true,"text":[{"text":"    let _ = vec![s4, s4, s4].into_iter().into_iter();","highlight_start":13,"highlight_end":53}],"label":null,"suggested_replacement":"vec![s4, s4, s4].into_iter()","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: useless conversion to the same type: `std::vec::IntoIter<Foo<'a'>>`\n  --> tests/ui/useless_conversion.rs:82:13\n   |\nLL |     let _ = vec![s4, s4, s4].into_iter().into_iter();\n   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `vec![s4, s4, s4].into_iter()`\n\n"}

------------------------------------------

thread 'compile_test' panicked at 'Some tests failed', /cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/compiletest_rs-0.8.0/src/lib.rs:111:22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants