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

move EarlyBinder into ImplTraitHeader #121852

Closed
lcnr opened this issue Mar 1, 2024 · 1 comment · Fixed by #122043
Closed

move EarlyBinder into ImplTraitHeader #121852

lcnr opened this issue Mar 1, 2024 · 1 comment · Fixed by #122043
Assignees
Labels
A-typesystem Area: The type system C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-types Relevant to the types team, which will review and decide on the PR/issue.

Comments

@lcnr
Copy link
Contributor

lcnr commented Mar 1, 2024

tcx.impl_trait_header currently returns EarlyBinder<ImplTraitHeader>. Move this EarlyBinder into the ImplTraitHeader to only wrap the TraitRef:

pub struct ImplTraitHeader<'tcx> {
    pub trait_ref: EarlyBinder<TraitRef<'tcx>>,
    pub polarity: ImplPolarity,
    pub unsafety: Unsafety,
}
@lcnr lcnr added E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-types Relevant to the types team, which will review and decide on the PR/issue. labels Mar 1, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 1, 2024
@jieyouxu jieyouxu added C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-typesystem Area: The type system and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 1, 2024
@Y-Nak
Copy link
Contributor

Y-Nak commented Mar 5, 2024

@rustbot claim

@bors bors closed this as completed in e52c541 Mar 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 7, 2024
Rollup merge of rust-lang#122043 - Y-Nak:move-early-binder, r=lcnr

Apply `EarlyBinder` only to `TraitRef` in `ImplTraitHeader`

Resolves rust-lang#121852

This PR
1. Moves `EarlyBinder` to `TraitRef` inside `ImplTraitHeader`,
2. Changes visibility of `coherence::builtin::check_trait` to `pub(super)` from `pub` as it seems not being re-exported from the `coherence` module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants