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

Prevent duplicate caller bounds candidates by exposing default substs in Unevaluated #90266

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

b-naber
Copy link
Contributor

@b-naber b-naber commented Oct 25, 2021

Fixes #89334

The changes introduced in #87280 allowed for "duplicate" caller bounds candidates to be assembled that only differed in their default substs having been "exposed" or not and resulted in an ambiguity error during trait selection. To fix this we expose the defaults substs during the creation of the ParamEnv.

r? @lcnr

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 25, 2021
@lcnr
Copy link
Contributor

lcnr commented Oct 25, 2021

cc https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/optional.20substs.20unevaluated

gj on figuring out the the issue isn't impl_trait_ref and ImplCandidates but ParamCandidates instead (at least this is how i interpret this PR ✨). nice

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 25, 2021

📌 Commit 0199a81 has been approved by lcnr

@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 Oct 25, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 25, 2021
…askrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#89581 (Add -Z no-unique-section-names to reduce ELF header bloat.)
 - rust-lang#90196 (Fix and extent ControlFlow `traverse_inorder` example)
 - rust-lang#90255 (:arrow_up: rust-analyzer)
 - rust-lang#90266 (Prevent duplicate caller bounds candidates by exposing default substs in Unevaluated)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 26e9a71 into rust-lang:master Oct 26, 2021
@rustbot rustbot added this to the 1.58.0 milestone Oct 26, 2021
@b-naber b-naber deleted the uneval_substs branch October 27, 2021 16:10
@lcnr lcnr added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 29, 2021
@lcnr
Copy link
Contributor

lcnr commented Oct 29, 2021

this PR fixes #90195 so we should probably backport this

@apiraino apiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Nov 4, 2021
@apiraino
Copy link
Contributor

Beta backport accepted as per compiler team on Zulip

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Nov 11, 2021
@cuviper cuviper mentioned this pull request Nov 16, 2021
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 16, 2021
@cuviper cuviper modified the milestones: 1.58.0, 1.57.0 Nov 16, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 19, 2021
[beta] backports

-  Fix assertion failures in OwnedHandle with windows_subsystem. rust-lang#88798
-  Ensure that pushing empty path works as before on verbatim paths rust-lang#89665
-  Feature gate + make must_not_suspend allow-by-default rust-lang#89826
-  Only use clone3 when needed for pidfd rust-lang#89930
-  Fix documentation header sizes rust-lang#90186
-  Fixes incorrect handling of ADT's drop requirements rust-lang#90218
-  Fix ICE when forgetting to Box a parameter to a Self::func call rust-lang#90221
-  Prevent duplicate caller bounds candidates by exposing default substs in Unevaluated rust-lang#90266
-  Update odht crate to 0.3.1 (big-endian bugfix) rust-lang#90403
-  rustdoc: Go back to loading all external crates unconditionally rust-lang#90489
-  Split doc_cfg and doc_auto_cfg features rust-lang#90502
-  Apply adjustments for field expression even if inaccessible rust-lang#90508
-  Warn for variables that are no longer captured rust-lang#90597
-  Properly register text_direction_codepoint_in_comment lint. rust-lang#90626
-  CI: Use ubuntu image to download openssl, curl sources, cacert.pem for x86 dist builds rust-lang#90457
-  Android is not GNU rust-lang#90834
-  Update llvm submodule rust-lang#90954

Additionally, this bumps the stage 0 compiler from beta to stable 1.56.1.

r? `@Mark-Simulacrum`
@lcnr lcnr added the A-const-generics Area: const generics (parameters and arguments) label Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible degradation in const generics
7 participants