Skip to content

remove lifetimes that can be elided (clippy::needless_lifetimes) - #69809

Merged
bors merged 1 commit into
rust-lang:masterfrom
matthiaskrgr:lifetimes
Mar 13, 2020
Merged

remove lifetimes that can be elided (clippy::needless_lifetimes)#69809
bors merged 1 commit into
rust-lang:masterfrom
matthiaskrgr:lifetimes

Conversation

@matthiaskrgr

Copy link
Copy Markdown
Member

No description provided.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 7, 2020
@eddyb

Copy link
Copy Markdown
Contributor

cc @rust-lang/compiler Don't we have a regular lint that also does this?

I remember wanting to do something like this then hitting some sort of issue.

Comment threadsrc/librustc_codegen_llvm/common.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is weird, shouldn't be -> &Type?

@eddybeddybMar 12, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

More examples here, maybe search for &'_ and replace them?

Comment threadsrc/librustc_driver/pretty.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm none of the changes in this file seem to create &'_ .

@eddyb

Copy link
Copy Markdown
Contributor

Ah, I must be thinking of single_use_lifetimes, see #53738 (comment).

(coincidentally got notified of that issue just now)

@matthiaskrgr

Copy link
Copy Markdown
MemberAuthor

Right, removed the redundant anonymous lifetimes

@eddyb

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Mar 12, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 7b1b08c has been approved by eddyb

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 12, 2020
Centril added a commit to Centril/rust that referenced this pull request Mar 12, 2020
remove lifetimes that can be elided (clippy::needless_lifetimes)
@CentrilCentril mentioned this pull request Mar 12, 2020
bors added a commit that referenced this pull request Mar 13, 2020
Rollup of 8 pull requests
Successful merges:
- #68746 (Make macro metavars respect (non-)hygiene)
- #69189 (Erase regions in writeback)
- #69402 (Extend search)
- #69403 (Implement `Copy` for `IoSlice`)
- #69460 (Move some `build-pass` tests to `check-pass`)
- #69802 (fix more clippy findings)
- #69809 (remove lifetimes that can be elided (clippy::needless_lifetimes))
- #69949 (triagebot.toml: add ping aliases)
Failed merges:
- #69589 (ast: `Mac`/`Macro` -> `MacCall`)
r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Mar 13, 2020
remove lifetimes that can be elided (clippy::needless_lifetimes)
@CentrilCentril mentioned this pull request Mar 13, 2020
@JohnTitorJohnTitor mentioned this pull request Mar 13, 2020
bors added a commit that referenced this pull request Mar 13, 2020
Rollup of 12 pull requests
Successful merges:
- #69403 (Implement `Copy` for `IoSlice`)
- #69460 (Move some `build-pass` tests to `check-pass`)
- #69723 (Added doc on keyword Pub.)
- #69802 (fix more clippy findings)
- #69809 (remove lifetimes that can be elided (clippy::needless_lifetimes))
- #69947 (Clean up E0423 explanation)
- #69949 (triagebot.toml: add ping aliases)
- #69954 (rename panic_if_ intrinsics to assert_)
- #69960 (miri engine: fix treatment of abort intrinsic)
- #69966 (Add more regression tests)
- #69973 (Update stable-since version for const_int_conversion)
- #69974 (Clean up E0434 explanation)
Failed merges:
r? @ghost
@bors
bors merged commit c13548d into rust-lang:masterMar 13, 2020
@matthiaskrgr
matthiaskrgr deleted the lifetimes branch January 25, 2025 09:12
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@matthiaskrgr@rust-highfive@eddyb@bors