Skip to content

Fix redundant_clone lint not working with PathBuf and OsString#5017

Merged
bors merged 1 commit into
rust-lang:masterfrom
sinkuu:mir_no_opt_fallout
Jan 8, 2020
Merged

Fix redundant_clone lint not working with PathBuf and OsString#5017
bors merged 1 commit into
rust-lang:masterfrom
sinkuu:mir_no_opt_fallout

Conversation

@sinkuu

@sinkuu sinkuu commented Jan 8, 2020

Copy link
Copy Markdown
Contributor

#4825 diabled MIR optimization in clippy, including rustc_mir::transform::InstCombine which reduces &(*x) to x. This PR tries to unwrap &* when looking into mir::Rvalues.

Fixes #5014.


changelog: fixed redundant_clone lint not working with PathBuf and OsString

@sinkuu sinkuu force-pushed the mir_no_opt_fallout branch from a9d44be to 99eec3f Compare January 8, 2020 05:18
@sinkuu sinkuu closed this Jan 8, 2020
@sinkuu sinkuu reopened this Jan 8, 2020
@flip1995

flip1995 commented Jan 8, 2020

Copy link
Copy Markdown
Member

@bors r+

Thanks!

@bors

bors commented Jan 8, 2020

Copy link
Copy Markdown
Contributor

📌 Commit 99eec3f has been approved by flip1995

@bors

bors commented Jan 8, 2020

Copy link
Copy Markdown
Contributor

⌛ Testing commit 99eec3f with merge b5c4ace...

bors added a commit that referenced this pull request Jan 8, 2020
Fix redundant_clone lint not working with PathBuf and OsString

#4825 diabled MIR optimization in clippy, including `rustc_mir::transform::InstCombine` which reduces `&(*x)` to `x`. This PR tries to unwrap `&*` when looking into `mir::Rvalue`s.

Fixes #5014.

---

changelog: fixed `redundant_clone` lint not working with `PathBuf` and `OsString`
@bors

bors commented Jan 8, 2020

Copy link
Copy Markdown
Contributor

💔 Test failed - checks-travis

@sinkuu

sinkuu commented Jan 8, 2020

Copy link
Copy Markdown
Contributor Author

It looks like a sprious networking error.

@flip1995

flip1995 commented Jan 8, 2020

Copy link
Copy Markdown
Member

@bors retry

@bors

bors commented Jan 8, 2020

Copy link
Copy Markdown
Contributor

⌛ Testing commit 99eec3f with merge 52b9e70...

bors added a commit that referenced this pull request Jan 8, 2020
Fix redundant_clone lint not working with PathBuf and OsString

#4825 diabled MIR optimization in clippy, including `rustc_mir::transform::InstCombine` which reduces `&(*x)` to `x`. This PR tries to unwrap `&*` when looking into `mir::Rvalue`s.

Fixes #5014.

---

changelog: fixed `redundant_clone` lint not working with `PathBuf` and `OsString`
@bors

bors commented Jan 8, 2020

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing 52b9e70 to master...

@bors bors merged commit 99eec3f into rust-lang:master Jan 8, 2020
@sinkuu sinkuu deleted the mir_no_opt_fallout branch January 13, 2020 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strange sort-of-regression in a single lint: clippy::redundant-clone

3 participants