Skip to content

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
Contributor

bors commented Feb 15, 2023

📌 Commit 17cb2e4 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Feb 15, 2023

⌛ Testing commit 17cb2e4 with merge e018a2c...

@bors
Copy link
Contributor

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