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 trivial cycles in persue_answer #469

Merged

Conversation

zaharidichev
Copy link
Contributor

This change ensures that we do not add trivial coinductive goals to the answer at all and filter them in pursue_answer. This allows us to have this check performed in a single place as @jackh726 was suggesting.

Fix #313

Signed-off-by: Zahari Dichev zaharidichev@gmail.com

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Copy link
Member

@jackh726 jackh726 left a comment

Choose a reason for hiding this comment

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

This looks right to me. Couple nits.

I'm a bit surprised I didn't see this the first time around. Good work :)

@@ -1328,11 +1314,23 @@ impl<'forest, C: Context + 'forest, CO: ContextOps<C> + 'forest> SolveState<'for
return None;
}

let table = self.stack.top().table;
Copy link
Member

Choose a reason for hiding this comment

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

This is already in scope at the beginning of the function.

chalk-engine/src/logic.rs Show resolved Hide resolved
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
@zaharidichev zaharidichev requested a review from jackh726 May 22, 2020 19:49
@jackh726
Copy link
Member

Potentially spurious error in CI, just gonna retry.

@jackh726 jackh726 merged commit 0f195ad into rust-lang:master May 22, 2020
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.

2 participants