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

Change for protocol so that for functions return a bool #6183

Closed
nikomatsakis opened this issue May 2, 2013 · 1 comment
Closed

Change for protocol so that for functions return a bool #6183

nikomatsakis opened this issue May 2, 2013 · 1 comment
Labels
A-codegen Area: Code generation A-type-system Area: Type system

Comments

@nikomatsakis
Copy link
Contributor

I argued in this blog post that this would be an improvement. Everyone seemed to agree. Nominating for milestone. I couldn't find an existing bug on this precise topic, but let me know if there is one.

@nikomatsakis
Copy link
Contributor Author

In terms of the compiler, this is mostly a matter of modifying the type checker so that for statements have unit type, and modifying trans to ignore the return value.

bors added a commit that referenced this issue May 11, 2013
Closes #6183.

The first commit changes the compiler's method of treating a `for` loop, and all the remaining commits are just dealing with the fallout.

The biggest fallout was the `IterBytes` trait, although it's really a whole lot nicer now because all of the `iter_bytes_XX` methods are just and-ed together. Sadly there was a huge amount of stuff that's `cfg(stage0)` gated, but whoever lands the next snapshot is going to have a lot of fun deleting all this code!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

2 participants