Skip to content

E0282 suggests changing desugared loop variable to __next #52415

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
estebank opened this issue Jul 16, 2018 · 1 comment
Closed

E0282 suggests changing desugared loop variable to __next #52415

estebank opened this issue Jul 16, 2018 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@estebank
Copy link
Contributor

fn main() {
    for (ref i,) in [].iter() {
        i.clone();
    }
}
error[E0282]: type annotations needed
  --> $DIR/issue-20261.rs:14:11
   |
LL |     for (ref i,) in [].iter() {
   |         -------- consider giving `__next` a type
LL |         i.clone();
   |           ^^^^^ cannot infer type for `_`
   |
= note: type must be known at this point
@estebank estebank added the A-diagnostics Area: Messages for errors, warnings, and lints label Jul 16, 2018
@estebank
Copy link
Contributor Author

Duplicate of #51116.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

1 participant