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

Liberate late-bound regions rather than erasing them in needless_pass_by_value #10328

Merged

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Feb 12, 2023

changelog: [needless_pass_by_value]: fixes an ICE when there are late-bound regions in function arguments that are needlessly passed by value

Fixes rust-lang/rust#107147
r? @matthiaskrgr

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 12, 2023
@compiler-errors
Copy link
Member Author

compiler-errors commented Feb 12, 2023

For the record, I have no idea how to make a clippy PR, or clippy UI test for that matter. Let me know if I did something wrong -- worst case, I can always open this against the rust-lang/rust repo :^)

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Feb 12, 2023

Looks good to me, yeah, basically just create foo.rs and foo.stderr in in the test directory and that's it. :)

Just two nites:

  • I would like to see the rustc ticket referenced in the .rs file so we know what this test was about, a comment like // https://github.com/rust-lang/rust/issues/107147 should do imo.
  • The test can be moved into tests/ui/crashes actually

@compiler-errors compiler-errors force-pushed the fix-re-erased-in-needless_pass_by_value branch from 0e3aa18 to 17cb2e4 Compare February 14, 2023 23:28
Copy link
Member

@matthiaskrgr matthiaskrgr left a comment

Choose a reason for hiding this comment

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

Thanks!

@matthiaskrgr
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 15, 2023

📌 Commit 17cb2e4 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Feb 15, 2023

⌛ Testing commit 17cb2e4 with merge e018a2c...

@bors
Copy link
Collaborator

bors commented Feb 15, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: matthiaskrgr
Pushing e018a2c to master...

@bors bors merged commit e018a2c into rust-lang:master Feb 15, 2023
@compiler-errors compiler-errors deleted the fix-re-erased-in-needless_pass_by_value branch February 15, 2023 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: clippy: cannot relate region: ReErased, -Wclippy::needless_pass_by_value
4 participants