Skip to content

rustc 1.18 beta type inference regression #42179

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
vbarrielle opened this issue May 23, 2017 · 1 comment
Closed

rustc 1.18 beta type inference regression #42179

vbarrielle opened this issue May 23, 2017 · 1 comment

Comments

@vbarrielle
Copy link

Hello, it looks like type inference has a regression on the latest beta.

With rustc at the version rustc 1.18.0-beta.2 (f4e8e81c3 2017-05-11), the code at https://github.com/vbarrielle/sprs/blob/master/src/sparse/triplet.rs#L464-L483 fails with:

error[E0282]: type annotations needed
   --> src/sparse/triplet.rs:477:13
    |
477 |         let csc = triplet_mat.to_csc();
    |             ^^^
    |             |
    |             consider giving `csc` a type
    |             cannot infer type for `sparse::CsMat<f64, _, std::vec::Vec<usize>, std::vec::Vec<usize>, std::vec::Vec<f64>>`

error: aborting due to previous error

error: Could not compile `sprs`.

However, this compiles fine on stable. It also compiles fine on the latest nightly, so it may have been fixed while fixing another type inference bug eg #41796.

@vbarrielle
Copy link
Author

This now compiles on latest beta rustc 1.18.0-beta.4 (0308c9865 2017-05-27).

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

1 participant