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

Doesn't compile (E0282) #78

Closed
Binero opened this issue Jun 11, 2015 · 4 comments
Closed

Doesn't compile (E0282) #78

Binero opened this issue Jun 11, 2015 · 4 comments

Comments

@Binero
Copy link
Contributor

Binero commented Jun 11, 2015

This library doesn't compile for me with the error below.

/.cargo/registry/src/github.com-0a35038f75765ae4/ncollide_procedural-0.2.0/utils.rs:218:13: 218:69 error: unable to infer enough type information about `_`; type annotations or generic parameter binding required [E0282]
/.cargo/registry/src/github.com-0a35038f75765ae4/ncollide_procedural-0.2.0/utils.rs:218     normals.extend(iter::repeat(na::zero()).take(coordinates.len()));
                                                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/.cargo/registry/src/github.com-0a35038f75765ae4/ncollide_procedural-0.2.0/utils.rs:218:13: 218:69 help: run `rustc --explain E0282` to see a detailed explanation
@sebcrozet
Copy link
Member

I believe you are using the nightlies or the compiler master branch. If so, I think the current trend is to work with the latest stable version of rustc, and wait for the next one in order to fix things. The error you are getting looks like a regression of the compiler on its type inference system.

@daboross
Copy link
Contributor

@sebcrozet

Even after 1.0, many people use the master branch in order to gain access to unstable features. Even though rust has stabilized, there are still many things which are unavailable on rust stable, and when people need those features they are going to use the nightly compiler. Stable releases have started, but that in no way means that people are going to stop using nightly releases as well.

Another thing to take into account is that rust 1.x release are allowed to make changes which break code, as specified in https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md. The change which broke this code in ncollide could easily be here to stay for rust 1.2. In this case, you are going to need to fix this code either now or when 1.2 is released, and it would be much nicer to fix it now rather than wait until rust 1.2 is released before fixing it.

@Binero
Copy link
Contributor Author

Binero commented Jun 15, 2015

I just created PR #82 which compiles both on stable and nightly.

@sebcrozet
Copy link
Member

Closing this as it was fixed by #82.

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

No branches or pull requests

3 participants