Skip to content

Remove obsolete error message regarding do-blocks with internal iters #8561

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

Closed

Conversation

lilyball
Copy link
Contributor

When using a do block to call an internal iterator, if you forgot to
return a value from the body, it would tell you

error: Do-block body must return bool, but returns () here. Perhaps
you meant to write a `for`-loop?

This advice no longer applies as for loops are now for external
iterators. Delete this message outright and let it use the default error
message

error: mismatched types: expected `bool` but found `()`

r? @thestinger

When using a `do` block to call an internal iterator, if you forgot to
return a value from the body, it would tell you

    error: Do-block body must return bool, but returns () here. Perhaps
    you meant to write a `for`-loop?

This advice no longer applies as `for` loops are now for external
iterators. Delete this message outright and let it use the default error
message

    error: mismatched types: expected `bool` but found `()`
bors added a commit that referenced this pull request Aug 19, 2013
…tinger

When using a `do` block to call an internal iterator, if you forgot to
return a value from the body, it would tell you

    error: Do-block body must return bool, but returns () here. Perhaps
    you meant to write a `for`-loop?

This advice no longer applies as `for` loops are now for external
iterators. Delete this message outright and let it use the default error
message

    error: mismatched types: expected `bool` but found `()`

r? @thestinger
@bors bors closed this Aug 19, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 24, 2022
add `or_then_unwrap`

Closes rust-lang#8557

changelog: New lint [`or_then_unwrap`]
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.

3 participants