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

Handle projection predicates in the param env for auto-trait docs #75205

Merged
merged 1 commit into from
Aug 12, 2020

Conversation

Aaron1011
Copy link
Member

Fixes #72213

Any predicates in the param env are guaranteed to hold, so we don't need
to do any additional processing of them if we come across them as
sub-obligations of a different predicate. This allows us to avoid adding
the same predicate to the computed ParamEnv multiple times (but with
different regions each time), which causes an ambiguity error during
fulfillment.

Fixes rust-lang#72213

Any predicates in the param env are guaranteed to hold, so we don't need
to do any additional processing of them if we come across them as
sub-obligations of a different predicate. This allows us to avoid adding
the same predicate to the computed ParamEnv multiple times (but with
different regions each time), which causes an ambiguity error during
fulfillment.
@rust-highfive
Copy link
Collaborator

r? @ecstatic-morse

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 6, 2020
@ecstatic-morse ecstatic-morse removed their assignment Aug 6, 2020
@ecstatic-morse
Copy link
Contributor

r? @nikomatsakis

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Aug 11, 2020

📌 Commit ab766f0 has been approved by nikomatsakis

@bors bors 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 Aug 11, 2020
@bors
Copy link
Contributor

bors commented Aug 12, 2020

⌛ Testing commit ab766f0 with merge 4745cbe...

@bors
Copy link
Contributor

bors commented Aug 12, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: nikomatsakis
Pushing 4745cbe to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 12, 2020
@bors bors merged commit 4745cbe into rust-lang:master Aug 12, 2020
@o01eg
Copy link
Contributor

o01eg commented Sep 1, 2020

Could it be back-ported to beta or even stable? I caught this issue with 1.46.0.

@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: 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.

rustc panic when running cargo doc in AutoTraitFinder::find_auto_trait_generics
7 participants