Skip to content

Remove unnecessary tcx parameter to param_env_to_generics #82137

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
jyn514 opened this issue Feb 15, 2021 · 2 comments · Fixed by #82597
Closed

Remove unnecessary tcx parameter to param_env_to_generics #82137

jyn514 opened this issue Feb 15, 2021 · 2 comments · Fixed by #82597
Assignees
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Feb 15, 2021

You can get a tcx from self.cx.tcx, there's no need to pass it separately.

Note that this will conflict with #82020 so you may want to wait a day or two (or not, if you don't mind rebasing).

@jyn514 jyn514 added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. E-help-wanted Call for participation: Help is requested to fix this issue. labels Feb 15, 2021
@nipunG314
Copy link

@rustbot claim

@camelid
Copy link
Member

camelid commented Feb 16, 2021

I think there are also a couple of other functions that unnecessarily take tcx in the same area of the code.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants