Skip to content

process cycles as soon as they are detected #32582

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

Merged
merged 3 commits into from
Apr 4, 2016

Conversation

nikomatsakis
Copy link
Contributor

We used to wait for the recursion limit, but that might well be too
long!

Fixes #32326
r? @aturon

// ~~~ (*) see above
debug!("process_child_obligations: cycle index = {}", index);

if coinductive_match(selcx, &obligation, &backtrace) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just realized that this is a bug -- we are overlooking the pending_obligation, which is at the logical "top" of the backtrace here

@bors
Copy link
Collaborator

bors commented Mar 31, 2016

☔ The latest upstream changes (presumably #32439) made this pull request unmergeable. Please resolve the merge conflicts.

@aturon
Copy link
Member

aturon commented Apr 1, 2016

@nikomatsakis OK, I've reviewed this and it's a clear improvement. r=me after a rebase.

We used to wait for the recursion limit, but that might well be too
long!
When deciding on a coinductive match, we were examining the new
obligation and the backtrace, but not the *current* obligation that goes
in between the two.  Refactoring the code to just have the cycle given
as input also made things a lot simpler.
@nikomatsakis
Copy link
Contributor Author

@bors r=aturon

@bors
Copy link
Collaborator

bors commented Apr 4, 2016

📌 Commit 6a749c7 has been approved by aturon

@nikomatsakis
Copy link
Contributor Author

@bors r=aturon

@bors
Copy link
Collaborator

bors commented Apr 4, 2016

📌 Commit e733b86 has been approved by aturon

@bors
Copy link
Collaborator

bors commented Apr 4, 2016

⌛ Testing commit e733b86 with merge 8d5e845...

bors added a commit that referenced this pull request Apr 4, 2016
process cycles as soon as they are detected

We used to wait for the recursion limit, but that might well be too
long!

Fixes #32326
r? @aturon
@bors bors merged commit e733b86 into rust-lang:master Apr 4, 2016
@nikomatsakis nikomatsakis deleted the issue-32326 branch October 3, 2016 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants