-
Notifications
You must be signed in to change notification settings - Fork 183
Remove dead code and re-enable functions tests #664
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
Conversation
This code has since been moved to chalk-recursive.
Not intentional. Can you fix that here? |
Do you want |
Just added to the module tree. |
The last two goal tests in function_implement_fn_traits fail. Instead of floundering, they return no solutions.
@@ -61,6 +62,9 @@ fn function_implement_fn_traits() { | |||
struct Ty { } | |||
|
|||
trait Clone { } | |||
|
|||
impl Clone for Ty { } | |||
|
|||
opaque type MyOpaque: Clone = Ty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last two tests in this set are supposed to flounder, but instead return "no more solutions". Maybe the floundering behavior has purposefully changed since this test was written?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something like the following should be added here
chalk/chalk-solve/src/clauses.rs
Lines 423 to 426 in 0b391f8
TyKind::OpaqueType(opaque_ty_id, _) => { | |
db.opaque_ty_data(*opaque_ty_id) | |
.to_program_clauses(builder, environment); | |
} |
if /* trait does not appear in opaque type bound */ {
return Err(Floundered);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New output looks correct here
@Mcat12 So this ends up being a bit of a mess. See master...jackh726:functions for a diff to fix the tests. Though, when doing that, I found that there are some weirdness to discuss.
|
I'm fine with working on the real fix for this, especially since the original change was just removing dead code (not blocking anything functional). Edit: Hm, the tests fail on this branch (based on master) but pass on your branch (based on an older commit). I don't see any obvious issues from looking at the diff between the branches. |
Ah oops, didn't realize I was using an outdated base. The problem is that we should also be floundering for general Edit: that also explains why the recursive solver was giving different results for me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, but I essentially wrote most of this, I'd like someone else to review. @matthewjasper does this look good to you?
@bors r+ |
📌 Commit 4c2cb04 has been approved by |
☀️ Test successful - checks-actions |
This code is not attached to the crate's module tree and has since been moved to chalk-recursive.
I also noticed that
tests/test/functions.rs
is not attached to the module tree, but I'm not sure if that is intentional.