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

Check for overflow in assemble_candidates_after_normalizing_self_ty #109683

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

compiler-errors
Copy link
Member

Prevents a stack overflow (:warning: :exclamation:) in the new solver when we have param-env candidates that look like: T: Trait<Assoc = <T as Trait>::Assoc>

The current error message looks bad, but that's because we don't distinguish overflow and other ambiguity errors. I'll break that out into a separate PR since the fix may be controversial.

r? @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Mar 27, 2023
@rustbot
Copy link
Collaborator

rustbot commented Mar 27, 2023

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 trivial style nits, apart from this r=me

very cool

@compiler-errors
Copy link
Member Author

@bors r=lcnr rollup (only affects new solver)

@bors
Copy link
Contributor

bors commented Mar 29, 2023

📌 Commit ef5f773 has been approved by lcnr

It is now in the queue for this repository.

@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 Mar 29, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2023
Rollup of 7 pull requests

Successful merges:

 - rust-lang#108335 (rustdoc + rustdoc-json support for `feature(non_lifetime_binders)`)
 - rust-lang#109534 (rustdoc: Unsupport importing `doc(primitive)` and `doc(keyword)` modules)
 - rust-lang#109659 (llvm-wrapper: adapt for LLVM API change)
 - rust-lang#109664 (Use span of placeholders in format_args!() expansion.)
 - rust-lang#109683 (Check for overflow in `assemble_candidates_after_normalizing_self_ty`)
 - rust-lang#109713 (Fix mismatched punctuation in Debug impl of AttrId)
 - rust-lang#109718 (Rename `IndexVec::last` → `last_index`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 09e9377 into rust-lang:master Mar 29, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 29, 2023
@compiler-errors compiler-errors deleted the self-ty-overflow branch August 11, 2023 20:19
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants