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

polymorphize: constrain unevaluated const handling #75333

Merged
merged 1 commit into from
Aug 11, 2020

Conversation

davidtwco
Copy link
Member

This PR constrains the support added for handling unevaluated consts in polymorphization (introduced in #75260) by:

  • Skipping associated constants as this causes cycle errors.
  • Skipping promoted constants when they contain Self as this ensures T is used in constants of the form <Self as Foo<T>>.

Due to an oversight on my part, when landing #75260 and #75255, some tests started failing when polymorphization was enabled that I didn't notice until after landing - this PR fixes the regressions from #75260.

r? @lcnr

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 9, 2020
This commit constrains the support added for handling unevaluated consts
in polymorphization (introduced in rust-lang#75260) by:

- Skipping associated constants as this causes cycle errors.
- Skipping promoted constants when they contain `Self` as this ensures
  `T` is used in constants of the form `<Self as Foo<T>>`.

Signed-off-by: David Wood <david@davidtw.co>
@lcnr
Copy link
Contributor

lcnr commented Aug 10, 2020

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 10, 2020

📌 Commit 20f4e16 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 Aug 10, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 11, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#74744 (Update RELEASES.md for 1.46.0)
 - rust-lang#75085 (Transmute big endian `s6_addr` and `[u16; 8]`)
 - rust-lang#75226 (Miri: Renamed "undef" to "uninit")
 - rust-lang#75333 (polymorphize: constrain unevaluated const handling)
 - rust-lang#75338 (move stack size check to const_eval machine)
 - rust-lang#75347 (Rustdoc: Fix natural ordering to look at all numbers.)
 - rust-lang#75352 (Tweak conditions for E0026 and E0769)
 - rust-lang#75353 (Tiny cleanup, remove unnecessary `unwrap`)
 - rust-lang#75359 (unused_delims: trim expr)
 - rust-lang#75360 (Add sample fix for E0749)

Failed merges:

r? @ghost
@bors bors merged commit 06f296a into rust-lang:master Aug 11, 2020
@davidtwco davidtwco deleted the polymorphization-75260-fixes branch August 11, 2020 14:42
@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
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.

5 participants