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 7 pull requests #103461

Closed
wants to merge 17 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

steffahn and others added 17 commits July 22, 2022 01:35
The lifetime bound `B::Owned: 'a` is redundant and doesn't make a difference,
because `Cow<'a, B>` comes with an implicit `B: 'a`, and associated types
will outlive lifetimes outlived by the `Self` type (and all the trait's
generic parameters, of which there are none in this case), so the implicit `B: 'a`
implies `B::Owned: 'a` anyway.

The explicit lifetime bound here does however end up in documentation,
and that's confusing in my opinion, so let's remove it ^^
This is the first (known) step towards starting to use `unix_sigpipe` in
the wild. Eventually, `rustc_driver::set_sigpipe_handler` can be removed
and all clients can use `unix_sigpipe` instead.

For now we just start using `unix_sigpipe` in once place: `rustc`
itself.

It is easy to manually verify this change. If you remove
`#[unix_sigpipe = "sig_dfl"]` and run `./x.py build` you will get an ICE
when you do `./build/x86_64-unknown-linux-gnu/stage1/bin/rustc --help |
false`. Add back `#[unix_sigpipe = "sig_dfl"]` and the ICE disappears
again.
These targets have system limits on the thread names, 16 and 64 bytes
respectively, and `pthread_setname_np` returns an error if the name is
longer. However, we're not in a context that can propagate errors when
we call this, and we used to implicitly truncate on Linux with `prctl`,
so now we manually truncate these names ahead of time.
…ry_enum_discriminant, r=joshtriplett

Stabilize arbitrary_enum_discriminant, take 2

Documentation has been updated in rust-lang/reference#1055. cc rust-lang#86860 for previous stabilization report.

Not yet marks rust-lang#60553 as done: need documentation in the rust reference.
…thomcc

Remove redundant lifetime bound from `impl Borrow for Cow`

The lifetime bound `B::Owned: 'a` is redundant and doesn't make a difference,
because `Cow<'a, B>` comes with an implicit `B: 'a`, and associated types
will outlive lifetimes outlived by the `Self` type (and all the trait's
generic parameters, of which there are none in this case), so the implicit `B: 'a`
implies `B::Owned: 'a` anyway.

The explicit lifetime bound here does however [end up in documentation](https://doc.rust-lang.org/std/borrow/enum.Cow.html#impl-Borrow%3CB%3E),
and that's confusing in my opinion, so let's remove it ^^

_(Documentation right now, compare to `AsRef`, too:)_
![Screenshot_20220722_014055](https://user-images.githubusercontent.com/3986214/180332665-424d0c05-afb3-40d8-a330-a57a2c9a494b.png)
Fake capture closures if typeck results are empty

This ICE happens because `closure_min_captures` is empty, the reason it's empty is with the 2021 edition `enable_precise_capture` is set to true, which makes it so that we can't fake capture any information because that result of the `unwrap` is none hence the ICE.

Other solution is editing [maybe_read_scrutinee](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_typeck/expr_use_visitor.rs.html#453-463) to this since empty slice contains no sub patterns.

Fixes rust-lang#93242

```rust
PatKind::Slice(_, ref slice, _) => {
    if slice.is_none(){
    need_to_be_read = true;
    }
}
// instead of
PatKind::Or(_)
| PatKind::Box(_)
| PatKind::Slice(..)
| PatKind::Ref(..)
| PatKind::Wild => {}
```
…h726

rustc: Use `unix_sigpipe` instead of `rustc_driver::set_sigpipe_handler`

This is the first (known) step towards starting to use `unix_sigpipe` in the wild. Eventually, `rustc_driver::set_sigpipe_handler` can be removed and all clients can use `unix_sigpipe` instead.

For now we just start using `unix_sigpipe` in one place: `rustc` itself.

It is easy to manually verify this change. If you remove `#[unix_sigpipe = "sig_dfl"]` and run `./x.py build` you will get an ICE when you do `./build/x86_64-unknown-linux-gnu/stage1/bin/rustc --help | false`. Add back `#[unix_sigpipe = "sig_dfl"]` and the ICE disappears again.

PR that added `set_sigpipe_handler`: rust-lang#49606

Tracking issue for `unix_sigpipe`: rust-lang#97889

Not sure exactly how to label this PR. Going with T-libs for now since this is a T-libs feature.

`@rustdoc` labels +T-libs
…acrum

Don't link to `libresolv` in libstd on Darwin

Currently we link `libresolv` into every Rust program on apple targets despite never using it (as of rust-lang#44965). I had thought we needed this for `getaddrinfo` or something, but we do not / cannot safely use it.

I'd like to fix this for `libiconv` too (the other library we pull in. that's harder since it's coming in through `libc`, which is rust-lang/libc#2944)).

---

This may warrant release notes. I'm not sure but I've added the flag regardless -- It's a change to the list of dylibs every Rust program pulls in, so it's worth mentioning.

It's pretty unlikely anybody was relying on this being pulled in, and `std` does not guarantee that it will link (and thus transitively provide access to) any particular system library -- anybody relying on that behavior would already be broken when dynamically linking std. That is, there's an outside chance something will fail to link on macOS and iOS because it was accidentally relying on our unnecessary dependency.

(If that *does* happen, that project could be easily fixed by linking libresolv explicitly on those platforms, probably via `#[link(name = "resolv")] extern {}`,` -Crustc-link-lib=resolv`, `println!("cargo:rustc-link-lib=resolv")`, or one of several places in `.config/cargo.toml`)

---

I'm also going to preemptively add the nomination for discussing this in the libs meeting. Basically: Do we care about programs that assume we will bring libraries in that we do not use. `libresolv` and `libiconv` on macOS/iOS are in this camp (`libresolv` because we used to use it, and `libiconv` because the `libc` crate was unintentionally(?) pulling it in to every Rust program).

I'd like to remove them both, but this may cause link issues programs that are relying on `std` to depend on them transitively. (Relying on std for this does not work in all build configurations, so this seems very fragile, and like a use case we should not support).

More generally, IMO we should not guarantee the specific set of system-provided libraries we use (beyond what is implied by an OS version requirement), which means we'd be free to remove this cruft.
Remove misc_cast and validate types when casting

Continuing our work in rust-lang#102675

r? `@oli-obk`
…omcc

Truncate thread names on Linux and Apple targets

These targets have system limits on the thread names, 16 and 64 bytes
respectively, and `pthread_setname_np` returns an error if the name is
longer. However, we're not in a context that can propagate errors when
we call this, and we used to implicitly truncate on Linux with `prctl`,
so now we manually truncate these names ahead of time.

r? `@thomcc`
@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. rollup A PR which is a rollup labels Oct 24, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Oct 24, 2022

📌 Commit 64e66e1 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 Oct 24, 2022
@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)
  IMAGE: x86_64-gnu-tools
##[endgroup]
From https://github.com/rust-lang/rust
 * branch              master     -> FETCH_HEAD
Searching for toolstate changes between 7feb003882ecf7699e6705b537673e20985accff and 206a1ae326c47da8cbbb534369a2baa30bb70abf
Tool subtrees were updated
##[group]Run src/ci/scripts/verify-channel.sh
src/ci/scripts/verify-channel.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
---

 error: redundant clone
   --> $DIR/redundant_clone.rs:10:42
    |
 LL |     let _s = ["lorem", "ipsum"].join(" ").to_string();
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:10:14
    |
    |
 LL |     let _s = ["lorem", "ipsum"].join(" ").to_string();
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: `-D clippy::redundant-clone` implied by `-D warnings`
 error: redundant clone
   --> $DIR/redundant_clone.rs:13:15
    |
    |
 LL |     let _s = s.clone();
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:13:14
    |
    |
 LL |     let _s = s.clone();
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:16:15
    |
    |
 LL |     let _s = s.to_string();
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:16:14
    |
    |
 LL |     let _s = s.to_string();
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:19:15
    |
    |
 LL |     let _s = s.to_owned();
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:19:14
    |
    |
 LL |     let _s = s.to_owned();
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:21:42
    |
    |
 LL |     let _s = Path::new("/a/b/").join("c").to_owned();
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:21:14
    |
    |
 LL |     let _s = Path::new("/a/b/").join("c").to_owned();
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:23:42
    |
    |
 LL |     let _s = Path::new("/a/b/").join("c").to_path_buf();
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:23:14
    |
    |
 LL |     let _s = Path::new("/a/b/").join("c").to_path_buf();
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:25:29
    |
    |
 LL |     let _s = OsString::new().to_owned();
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:25:14
    |
    |
 LL |     let _s = OsString::new().to_owned();
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:27:29
    |
    |
 LL |     let _s = OsString::new().to_os_string();
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:27:14
    |
    |
 LL |     let _s = OsString::new().to_os_string();
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:38:19
    |
    |
 LL |     let _t = tup.0.clone();
error: test failed, to rerun pass `--test compile-test`
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:38:14
   --> $DIR/redundant_clone.rs:38:14
    |
 LL |     let _t = tup.0.clone();
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:70:25
    |
    |
 LL |     if b { (a.clone(), a.clone()) } else { (Alpha, a) }
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:70:24
    |
    |
 LL |     if b { (a.clone(), a.clone()) } else { (Alpha, a) }
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:127:15
    |
    |
 LL |     let _s = s.clone();
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:127:14
    |
    |
 LL |     let _s = s.clone();
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:128:15
    |
    |
 LL |     let _t = t.clone();
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:128:14
    |
    |
 LL |     let _t = t.clone();
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:138:19
    |
    |
 LL |         let _f = f.clone();
    |
 note: this value is dropped without further use
   --> $DIR/redundant_clone.rs:138:18
    |
    |
 LL |         let _f = f.clone();
 
 error: redundant clone
   --> $DIR/redundant_clone.rs:150:14
    |
    |
 LL |     let y = x.clone().join("matthias");
    |
 note: cloned value is neither consumed nor mutated
   --> $DIR/redundant_clone.rs:150:13
    |
    |
 LL |     let y = x.clone().join("matthias");
 
-error: redundant clone
-  --> $DIR/redundant_clone.rs:204:11
-   |
-   |
-LL |     foo(&x.clone(), move || {
-   |
-note: this value is dropped without further use
-  --> $DIR/redundant_clone.rs:204:10
-   |
-   |
-LL |     foo(&x.clone(), move || {
-
-error: aborting due to 15 previous errors
+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/redundant_clone.stage-id.stderr
diff of fixed:

 // run-rustfix
 // rustfix-only-machine-applicable
 #![feature(lint_reasons)]
 #![allow(clippy::drop_non_drop, clippy::implicit_clone, clippy::uninlined_format_args)]
 use std::ffi::OsString;
 use std::path::Path;
 
 fn main() {
 fn main() {
     let _s = ["lorem", "ipsum"].join(" ");
     let s = String::from("foo");
     let _s = s;
 
     let s = String::from("foo");
     let s = String::from("foo");
     let _s = s;
 
     let s = String::from("foo");
     let _s = s;
 
     let _s = Path::new("/a/b/").join("c");
 
     let _s = Path::new("/a/b/").join("c");
     let _s = OsString::new();
 
     let _s = OsString::new();
 
 
     // Check that lint level works
     #[allow(clippy::redundant_clone)]
     let _s = String::new().to_string();
     // Check that lint level works
     // Check that lint level works
     #[expect(clippy::redundant_clone)]
     let _s = String::new().to_string();
 
     let tup = (String::from("foo"),);
     let _t = tup.0;
 
     let tup_ref = &(String::from("foo"),);
     let _s = tup_ref.0.clone(); // this `.clone()` cannot be removed
     {
         let x = String::new();
         let x = String::new();
         let y = &x;
 
         let _x = x.clone(); // ok; `x` is borrowed by `y`
 
         let _ = y.len();
 
     let x = (String::new(),);
     let x = (String::new(),);
     let _ = Some(String::new()).unwrap_or_else(|| x.0.clone()); // ok; closure borrows `x`
 
     with_branch(Alpha, true);
     cannot_double_move(Alpha);
     cannot_move_from_type_with_drop();
     borrower_propagation();
     not_consumed();
     manually_drop();
     clone_then_move_cloned();
     hashmap_neg();
     false_negative_5707();
     false_negative_5707();
 }
 
 #[derive(Clone)]
 struct Alpha;
 fn with_branch(a: Alpha, b: bool) -> (Alpha, Alpha) {
     if b { (a.clone(), a) } else { (Alpha, a) }
 
 
 fn cannot_double_move(a: Alpha) -> (Alpha, Alpha) {
     (a.clone(), a)
 
 
 struct TypeWithDrop {
     x: String,
 
 
 impl Drop for TypeWithDrop {
     fn drop(&mut self) {}
 
 
 fn cannot_move_from_type_with_drop() -> String {
     let s = TypeWithDrop { x: String::new() };
     s.x.clone() // removing this `clone()` summons E0509
 
 fn borrower_propagation() {
     let s = String::new();
     let t = String::new();
     let t = String::new();
 
     {
         fn b() -> bool {
             unimplemented!()
         }
         let _u = if b() { &s } else { &t };
 
         // ok; `s` and `t` are possibly borrowed
         let _s = s.clone();
         let _t = t.clone();
 
     {
     {
         let _u = || s.len();
         let _v = [&t; 32];
         let _s = s.clone(); // ok
         let _t = t.clone(); // ok
 
     {
         let _u = {
         let _u = {
             let u = Some(&s);
             let _ = s.clone(); // ok
         };
         };
         let _s = s.clone(); // ok
 
     {
         use std::convert::identity as id;
         use std::convert::identity as id;
         let _u = id(id(&s));
         let _s = s.clone(); // ok, `u` borrows `s`
 
     let _s = s;
     let _t = t;
 
---
         let _f = f;
     }
 
     {
         let f = Foo { x: 123 };
         let _x = &f.x;
         let _f = f.clone(); // ok
 }
 
 fn not_consumed() {
 fn not_consumed() {
     let x = std::path::PathBuf::from("home");
     let y = x.join("matthias");
     // join() creates a new owned PathBuf, does not take a &mut to x variable, thus the .clone() is
     // redundant. (It also does not consume the PathBuf)
 
     println!("x: {:?}, y: {:?}", x, y);
     let mut s = String::new();
     let mut s = String::new();
     s.clone().push_str("foo"); // OK, removing this `clone()` will change the behavior.
     s.push_str("bar");
     assert_eq!(s, "bar");
     let t = Some(s);
     // OK
     // OK
     if let Some(x) = t.clone() {
     }
     }
     if let Some(x) = t {
     }
 }
 
 
 #[allow(clippy::clone_on_copy)]
 fn issue_5405() {
     let a: [String; 1] = [String::from("foo")];
     let _b: String = a[0].clone();
 
     let c: [usize; 2] = [2, 3];
     let _d: usize = c[1].clone();
 
 fn manually_drop() {
     use std::mem::ManuallyDrop;
     use std::sync::Arc;
     use std::sync::Arc;
 
     let a = ManuallyDrop::new(Arc::new("Hello!".to_owned()));
     let _ = a.clone(); // OK
 
     let p: *const String = Arc::into_raw(ManuallyDrop::into_inner(a));
         Arc::from_raw(p);
         Arc::from_raw(p);
     }
 }
 }
 
 fn clone_then_move_cloned() {
     // issue #5973
     let x = Some(String::new());
     // ok, x is moved while the clone is in use.
     assert_eq!(x.clone(), None, "not equal {}", x.unwrap());
     // issue #5595
     // issue #5595
     fn foo<F: Fn()>(_: &Alpha, _: F) {}
     let x = Alpha;
     // ok, data is moved while the clone is in use.
-    foo(&x, move || {
+    foo(&x.clone(), move || {
         let _ = x;
 
     // issue #6998
     struct S(String);
     impl S {
     impl S {
         fn m(&mut self) {}
     }
     let mut x = S(String::new());
     x.0.clone().chars().for_each(|_| x.m());
 
 
 fn hashmap_neg() {
     // issue 5707
     use std::path::PathBuf;
 
 
     let p = PathBuf::from("/");
 
     let mut h: HashMap<&str, &str> = HashMap::new();
     h.insert("orig-p", p.to_str().unwrap());
 
     let mut q = p.clone();
     q.push("foo");
 
     println!("{:?} {}", h, q.display());
 
 fn false_negative_5707() {
 fn false_negative_5707() {
     fn foo(_x: &Alpha, _y: &mut Alpha) {}
     let x = Alpha;
     let mut y = Alpha;
     let mut y = Alpha;
     foo(&x, &mut y);
     let _z = x.clone(); // pr 7346 can't lint on `x`
     drop(y);
 

The actual fixed differed from the expected fixed.
The actual fixed differed from the expected fixed.
Actual fixed saved to /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/redundant_clone.stage-id.fixed
To only update this specific test, also pass `--test-args redundant_clone.rs`

error: 2 errors occurred comparing output.
status: exit status: 1
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/redundant_clone.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/redundant_clone.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" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-3ef490519219f110.rlib" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-5ac9fbce59ab185e.rlib" "--extern" "serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-4ace64e065702c69.so" "--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" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-b9c731f380466bd0.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-e95902f0f3ef680a.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-f474b2dfd384a595.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-b6f83e8bf7b1d2e3.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" "clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-f2da228ff241ec97.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-619ac20e364f2b2c.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-e0524b7e2611e851.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-97618c8d1e1f91be.so" "--edition=2021" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/test/ui/redundant_clone.stage-id.aux"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":264,"byte_end":276,"line_start":10,"line_end":10,"column_start":42,"column_end":54,"is_primary":true,"text":[{"text":"    let _s = [\"lorem\", \"ipsum\"].join(\" \").to_string();","highlight_start":42,"highlight_end":54}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":236,"byte_end":264,"line_start":10,"line_end":10,"column_start":14,"column_end":42,"is_primary":true,"text":[{"text":"    let _s = [\"lorem\", \"ipsum\"].join(\" \").to_string();","highlight_start":14,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"`-D clippy::redundant-clone` implied by `-D warnings`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":264,"byte_end":276,"line_start":10,"line_end":10,"column_start":42,"column_end":54,"is_primary":true,"text":[{"text":"    let _s = [\"lorem\", \"ipsum\"].join(\" \").to_string();","highlight_start":42,"highlight_end":54}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:10:42\n   |\nLL |     let _s = [\"lorem\", \"ipsum\"].join(\" \").to_string();\n   |                                          ^^^^^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:10:14\n   |\nLL |     let _s = [\"lorem\", \"ipsum\"].join(\" \").to_string();\n   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n   = note: `-D clippy::redundant-clone` implied by `-D warnings`\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":326,"byte_end":334,"line_start":13,"line_end":13,"column_start":15,"column_end":23,"is_primary":true,"text":[{"text":"    let _s = s.clone();","highlight_start":15,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":325,"byte_end":326,"line_start":13,"line_end":13,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"    let _s = s.clone();","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":326,"byte_end":334,"line_start":13,"line_end":13,"column_start":15,"column_end":23,"is_primary":true,"text":[{"text":"    let _s = s.clone();","highlight_start":15,"highlight_end":23}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:13:15\n   |\nLL |     let _s = s.clone();\n   |               ^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:13:14\n   |\nLL |     let _s = s.clone();\n   |              ^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":384,"byte_end":396,"line_start":16,"line_end":16,"column_start":15,"column_end":27,"is_primary":true,"text":[{"text":"    let _s = s.to_string();","highlight_start":15,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":383,"byte_end":384,"line_start":16,"line_end":16,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"    let _s = s.to_string();","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":384,"byte_end":396,"line_start":16,"line_end":16,"column_start":15,"column_end":27,"is_primary":true,"text":[{"text":"    let _s = s.to_string();","highlight_start":15,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:16:15\n   |\nLL |     let _s = s.to_string();\n   |               ^^^^^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:16:14\n   |\nLL |     let _s = s.to_string();\n   |              ^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":446,"byte_end":457,"line_start":19,"line_end":19,"column_start":15,"column_end":26,"is_primary":true,"text":[{"text":"    let _s = s.to_owned();","highlight_start":15,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":445,"byte_end":446,"line_start":19,"line_end":19,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"    let _s = s.to_owned();","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":446,"byte_end":457,"line_start":19,"line_end":19,"column_start":15,"column_end":26,"is_primary":true,"text":[{"text":"    let _s = s.to_owned();","highlight_start":15,"highlight_end":26}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:19:15\n   |\nLL |     let _s = s.to_owned();\n   |               ^^^^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:19:14\n   |\nLL |     let _s = s.to_owned();\n   |              ^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":501,"byte_end":512,"line_start":21,"line_end":21,"column_start":42,"column_end":53,"is_primary":true,"text":[{"text":"    let _s = Path::new(\"/a/b/\").join(\"c\").to_owned();","highlight_start":42,"highlight_end":53}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":473,"byte_end":501,"line_start":21,"line_end":21,"column_start":14,"column_end":42,"is_primary":true,"text":[{"text":"    let _s = Path::new(\"/a/b/\").join(\"c\").to_owned();","highlight_start":14,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":501,"byte_end":512,"line_start":21,"line_end":21,"column_start":42,"column_end":53,"is_primary":true,"text":[{"text":"    let _s = Path::new(\"/a/b/\").join(\"c\").to_owned();","highlight_start":42,"highlight_end":53}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:21:42\n   |\nLL |     let _s = Path::new(\"/a/b/\").join(\"c\").to_owned();\n   |                                          ^^^^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:21:14\n   |\nLL |     let _s = Path::new(\"/a/b/\").join(\"c\").to_owned();\n   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":556,"byte_end":570,"line_start":23,"line_end":23,"column_start":42,"column_end":56,"is_primary":true,"text":[{"text":"    let _s = Path::new(\"/a/b/\").join(\"c\").to_path_buf();","highlight_start":42,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":528,"byte_end":556,"line_start":23,"line_end":23,"column_start":14,"column_end":42,"is_primary":true,"text":[{"text":"    let _s = Path::new(\"/a/b/\").join(\"c\").to_path_buf();","highlight_start":14,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":556,"byte_end":570,"line_start":23,"line_end":23,"column_start":42,"column_end":56,"is_primary":true,"text":[{"text":"    let _s = Path::new(\"/a/b/\").join(\"c\").to_path_buf();","highlight_start":42,"highlight_end":56}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:23:42\n   |\nLL |     let _s = Path::new(\"/a/b/\").join(\"c\").to_path_buf();\n   |                                          ^^^^^^^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:23:14\n   |\nLL |     let _s = Path::new(\"/a/b/\").join(\"c\").to_path_buf();\n   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":601,"byte_end":612,"line_start":25,"line_end":25,"column_start":29,"column_end":40,"is_primary":true,"text":[{"text":"    let _s = OsString::new().to_owned();","highlight_start":29,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":586,"byte_end":601,"line_start":25,"line_end":25,"column_start":14,"column_end":29,"is_primary":true,"text":[{"text":"    let _s = OsString::new().to_owned();","highlight_start":14,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":601,"byte_end":612,"line_start":25,"line_end":25,"column_start":29,"column_end":40,"is_primary":true,"text":[{"text":"    let _s = OsString::new().to_owned();","highlight_start":29,"highlight_end":40}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:25:29\n   |\nLL |     let _s = OsString::new().to_owned();\n   |                             ^^^^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:25:14\n   |\nLL |     let _s = OsString::new().to_owned();\n   |              ^^^^^^^^^^^^^^^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":643,"byte_end":658,"line_start":27,"line_end":27,"column_start":29,"column_end":44,"is_primary":true,"text":[{"text":"    let _s = OsString::new().to_os_string();","highlight_start":29,"highlight_end":44}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":628,"byte_end":643,"line_start":27,"line_end":27,"column_start":14,"column_end":29,"is_primary":true,"text":[{"text":"    let _s = OsString::new().to_os_string();","highlight_start":14,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":643,"byte_end":658,"line_start":27,"line_end":27,"column_start":29,"column_end":44,"is_primary":true,"text":[{"text":"    let _s = OsString::new().to_os_string();","highlight_start":29,"highlight_end":44}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:27:29\n   |\nLL |     let _s = OsString::new().to_os_string();\n   |                             ^^^^^^^^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:27:14\n   |\nLL |     let _s = OsString::new().to_os_string();\n   |              ^^^^^^^^^^^^^^^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":946,"byte_end":954,"line_start":38,"line_end":38,"column_start":19,"column_end":27,"is_primary":true,"text":[{"text":"    let _t = tup.0.clone();","highlight_start":19,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":941,"byte_end":946,"line_start":38,"line_end":38,"column_start":14,"column_end":19,"is_primary":true,"text":[{"text":"    let _t = tup.0.clone();","highlight_start":14,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":946,"byte_end":954,"line_start":38,"line_end":38,"column_start":19,"column_end":27,"is_primary":true,"text":[{"text":"    let _t = tup.0.clone();","highlight_start":19,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:38:19\n   |\nLL |     let _t = tup.0.clone();\n   |                   ^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:38:14\n   |\nLL |     let _t = tup.0.clone();\n   |              ^^^^^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":1716,"byte_end":1724,"line_start":70,"line_end":70,"column_start":25,"column_end":33,"is_primary":true,"text":[{"text":"    if b { (a.clone(), a.clone()) } else { (Alpha, a) }","highlight_start":25,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":1715,"byte_end":1716,"line_start":70,"line_end":70,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":"    if b { (a.clone(), a.clone()) } else { (Alpha, a) }","highlight_start":24,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":1716,"byte_end":1724,"line_start":70,"line_end":70,"column_start":25,"column_end":33,"is_primary":true,"text":[{"text":"    if b { (a.clone(), a.clone()) } else { (Alpha, a) }","highlight_start":25,"highlight_end":33}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:70:25\n   |\nLL |     if b { (a.clone(), a.clone()) } else { (Alpha, a) }\n   |                         ^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:70:24\n   |\nLL |     if b { (a.clone(), a.clone()) } else { (Alpha, a) }\n   |                        ^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":2833,"byte_end":2841,"line_start":127,"line_end":127,"column_start":15,"column_end":23,"is_primary":true,"text":[{"text":"    let _s = s.clone();","highlight_start":15,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":2832,"byte_end":2833,"line_start":127,"line_end":127,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"    let _s = s.clone();","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":2833,"byte_end":2841,"line_start":127,"line_end":127,"column_start":15,"column_end":23,"is_primary":true,"text":[{"text":"    let _s = s.clone();","highlight_start":15,"highlight_end":23}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:127:15\n   |\nLL |     let _s = s.clone();\n   |               ^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:127:14\n   |\nLL |     let _s = s.clone();\n   |              ^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":2857,"byte_end":2865,"line_start":128,"line_end":128,"column_start":15,"column_end":23,"is_primary":true,"text":[{"text":"    let _t = t.clone();","highlight_start":15,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":2856,"byte_end":2857,"line_start":128,"line_end":128,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"    let _t = t.clone();","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":2857,"byte_end":2865,"line_start":128,"line_end":128,"column_start":15,"column_end":23,"is_primary":true,"text":[{"text":"    let _t = t.clone();","highlight_start":15,"highlight_end":23}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:128:15\n   |\nLL |     let _t = t.clone();\n   |               ^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:128:14\n   |\nLL |     let _t = t.clone();\n   |              ^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":3015,"byte_end":3023,"line_start":138,"line_end":138,"column_start":19,"column_end":27,"is_primary":true,"text":[{"text":"        let _f = f.clone();","highlight_start":19,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this value is dropped without further use","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":3014,"byte_end":3015,"line_start":138,"line_end":138,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":"        let _f = f.clone();","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":3015,"byte_end":3023,"line_start":138,"line_end":138,"column_start":19,"column_end":27,"is_primary":true,"text":[{"text":"        let _f = f.clone();","highlight_start":19,"highlight_end":27}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:138:19\n   |\nLL |         let _f = f.clone();\n   |                   ^^^^^^^^ help: remove this\n   |\nnote: this value is dropped without further use\n  --> tests/ui/redundant_clone.rs:138:18\n   |\nLL |         let _f = f.clone();\n   |                  ^\n\n"}
{"message":"redundant clone","code":{"code":"clippy::redundant_clone","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":3215,"byte_end":3223,"line_start":150,"line_end":150,"column_start":14,"column_end":22,"is_primary":true,"text":[{"text":"    let y = x.clone().join(\"matthias\");","highlight_start":14,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"cloned value is neither consumed nor mutated","code":null,"level":"note","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":3214,"byte_end":3223,"line_start":150,"line_end":150,"column_start":13,"column_end":22,"is_primary":true,"text":[{"text":"    let y = x.clone().join(\"matthias\");","highlight_start":13,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove this","code":null,"level":"help","spans":[{"file_name":"tests/ui/redundant_clone.rs","byte_start":3215,"byte_end":3223,"line_start":150,"line_end":150,"column_start":14,"column_end":22,"is_primary":true,"text":[{"text":"    let y = x.clone().join(\"matthias\");","highlight_start":14,"highlight_end":22}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: redundant clone\n  --> tests/ui/redundant_clone.rs:150:14\n   |\nLL |     let y = x.clone().join(\"matthias\");\n   |              ^^^^^^^^ help: remove this\n   |\nnote: cloned value is neither consumed nor mutated\n  --> tests/ui/redundant_clone.rs:150:13\n   |\nLL |     let y = x.clone().join(\"matthias\");\n   |             ^^^^^^^^^\n\n"}

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

thread 'compile_test' panicked at 'Some tests failed', /cargo/registry/src/gitpro.ttaallkk.top-1ecc6299db9ec823/compiletest_rs-0.9.0/src/lib.rs:111:22

@matthiaskrgr
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 24, 2022
@Dylan-DPC Dylan-DPC closed this Oct 24, 2022
@Dylan-DPC Dylan-DPC deleted the rollup-jlx07h0 branch October 24, 2022 13:42
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-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.