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

Propagate recursion depth in collect_predicates_for_types #111736

Closed

Conversation

matthewjasper
Copy link
Contributor

This only changes the Obligation::new call that caused the linked issue, but there are some others in the trait solver that should be looked at later.

Bug was introduced in #109119, so fix might be worth backporting.
cc #111729

r? @lcnr

@matthewjasper matthewjasper added the beta-nominated Nominated for backporting to the compiler in the beta channel. label May 18, 2023
@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. labels May 18, 2023
@lcnr
Copy link
Contributor

lcnr commented May 19, 2023

This only changes the Obligation::new call that caused the linked issue, but there are some others in the trait solver that should be looked at later.

I think that generally, relying on Obligation::with_depth to get this right is very dangerous. There are a lot of places where we either use obligation.rebind or just Obligation::new.

Looked for a safer approach to correctly updating the depth here which resulted in #111754. I hope you don't mind me opening a separate PR here, I already made the change to test that it works so just dropping that change and suggesting it in a review didn't feel useful.

@apiraino
Copy link
Contributor

apiraino commented May 19, 2023

I'll un-nominate for backport since superseded by #111754

@rustbot label -beta-nominated

@rustbot rustbot removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants