-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Improved template loop generation #401
Conversation
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.
For this change, it would actually be good just to add some simple test cases that exercise the new heuristics, for example, one test case per match arm you've added. Sound good?
I also prefer to rebase PRs, in which case I don't get to rewrite the commit message, so please just add the issue numbers. Should be easy with git commit --amend && git push -f
.
a563f87
to
7c1fec3
Compare
I've added a few tests. I wanted to add a test using
|
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 is awesome, thanks!
Fixes #107
Fixes #333
Closes #221
No test cases were modified, and this is a non-breaking change.
This PR improves the generation of
TemplateLoop
, such that it has a higher chance to produce Rust code that will actually compile, based on assumptions that can be drawn from the context of the expression used. See the comments in the code, for what those assumptions are.Old Explanation (from #396 related to this change):