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

compile error for one line repeated 11 times #17291

Closed
makoConstruct opened this issue Sep 16, 2014 · 3 comments
Closed

compile error for one line repeated 11 times #17291

makoConstruct opened this issue Sep 16, 2014 · 3 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@makoConstruct
Copy link

fn main() {
    for i in range(0, 30) {
    }
}

says

2:11: 2:16 error: cannot determine a type for this bounded type parameter: cannot determine the type of this integer; add a suffix to specify the type explicitly
2   for i in range(0, 30) {
             ^~~~~

11 times.

@thestinger
Copy link
Contributor

It's not caused by loop unrolling, optimizations aren't done in the frontend. The same errors occur with for i in range(0, 1).

@thestinger thestinger changed the title compile error for one line repeated 11 times probably due to loop unrolling compile error for one line repeated 11 times Sep 16, 2014
@thestinger thestinger added the A-diagnostics Area: Messages for errors, warnings, and lints label Sep 16, 2014
@makoConstruct
Copy link
Author

Yes, the error on that line is expected, perhaps I could be clearer, I'm reporting the fact that it was repeated 11 times.

@reem
Copy link
Contributor

reem commented Sep 16, 2014

Dup of #16966

rustc sometimes duplicates error reporting.

lnicola pushed a commit to lnicola/rust that referenced this issue Jun 2, 2024
Fix `data_constructor` ignoring generics for struct

Previously didn't work for structs with generics due to `field.ty()` having placeholders in type.
_Enums were handeled correctly already._

Also renamed `type_constructor -> data_constructor` as this is more correct name for it
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

3 participants