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

Document desugarings that happen when creating hir #414

Merged
merged 1 commit into from
Sep 20, 2018

Conversation

matthewjasper
Copy link
Contributor

@matthewjasper matthewjasper commented Sep 9, 2018

Closes #46
Closes #47


```rust
{
let result = match IntoIterator::into_iter(iter_expr) {
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC there should be some note here about how into_iter is looked up? It's not a lang item.

{
let result = match IntoIterator::into_iter(iter_expr) {
mut iter => 'label: loop {
let next;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we simplify this by let PAT = match ...?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't work out how let mut next = ... would be different, but let PAT = match would have a different drop order when PAT is something like (x, _).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is why it can't be simplified.

@matthewjasper
Copy link
Contributor Author

Comments addressed

@alercah alercah merged commit 221ea65 into rust-lang:master Sep 20, 2018
@matthewjasper matthewjasper deleted the hir-desugaring branch October 18, 2018 21:02
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