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

Rust 1.18 regression, constrained-0.1.0, cannot infer type #41796

Closed
brson opened this issue May 6, 2017 · 9 comments
Closed

Rust 1.18 regression, constrained-0.1.0, cannot infer type #41796

brson opened this issue May 6, 2017 · 9 comments
Assignees
Labels
A-type-system Area: Type system P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@brson
Copy link
Contributor

brson commented May 6, 2017

https://github.com/dylanede/constrained

101 brian@ip-10-145-43-250:~/dev/constrained⟫ git log -1
commit d3dfd78ebf46b8a5e03e8f1ef803506c07a2b15d
Merge: 1a03281 d288d01
Author: Dylan Ede <dylanede@googlemail.com>
Date:   Sun Apr 10 13:57:34 2016 +0100

    Merge branch 'master' of github.com:dylanede/constrained
brian@ip-10-145-43-250:/mnt2/dev⟫ rustc +beta -Vv
rustc 1.18.0-beta.1 (4dce67253 2017-04-25)
binary: rustc
commit-hash: 4dce67253d67785c74c8d270c38d774edd0deed8
commit-date: 2017-04-25
host: x86_64-unknown-linux-gnu
release: 1.18.0-beta.1
LLVM version: 3.9
brian@ip-10-145-43-250:~/dev/constrained⟫ cargo +beta test
   Compiling libc v0.2.4
   Compiling winapi-build v0.1.1
   Compiling rustc-serialize v0.3.16
   Compiling winapi v0.2.5
   Compiling advapi32-sys v0.1.2
   Compiling rand v0.3.13
   Compiling num v0.1.30
   Compiling dense_mats v0.4.0
   Compiling sprs v0.3.0
error[E0282]: type annotations needed
   --> /home/brian/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/sprs-0.3.0/src/sparse/binop.rs:158:19
    |
158 |       let mut res = match rhs.ordering() {
    |  ___________________^
159 | |         StorageOrder::C => MatOwned::zeros(rhs.shape()),
160 | |         StorageOrder::F => MatOwned::zeros_f(rhs.shape()),
161 | |         _ => unreachable!(),
162 | |     };
    | |_____^ cannot infer type for `dense_mats::Tensor<_, [usize; 2], std::vec::Vec<N>>`

error: aborting due to previous error

error: Could not compile `sprs`.

To learn more, run the command again with --verbose.

cc @dylanede

@brson brson added regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 6, 2017
@brson
Copy link
Contributor Author

brson commented May 6, 2017

Oh the failure is actually in sprs-0.3.0 cc @vbarrielle.

@vbarrielle
Copy link

Hello,

I can fix this with a simple type annotation, but the trouble is, this comes from a fairly old version of sprs (0.3.0, but I'm developping over version 0.5.0 with several breaking changes). I cannot patch version 0.3.0 and submit a fixed version on crates.io, since there are already versions 0.3.x published.

On solution I can see is for constrained to depend upon version 0.3.3 or later, and I could fix the type inference in a version 0.3.4.

How does that sound?

@Mark-Simulacrum
Copy link
Member

84be2df -- #41236 (second time)

@brson
Copy link
Contributor Author

brson commented May 8, 2017

@vbarrielle let's see if it's a bug on our side before you work around it.

@nikomatsakis
Copy link
Contributor

nikomatsakis commented May 9, 2017

Possibly related to #41727

@nikomatsakis
Copy link
Contributor

Good news, this seems to build on my PR #41716, which is a fix for #41716.

@brson
Copy link
Contributor Author

brson commented May 25, 2017

Still repros on 1.18.0-beta.3. I'll bump beta to .4.

@nikomatsakis
Copy link
Contributor

@brson this was backported in #42182, which landed 2 days ago -- not sure which beta that is though

@nikomatsakis nikomatsakis self-assigned this May 25, 2017
@nikomatsakis
Copy link
Contributor

This seems to work for me now. (I just pulled the latest beta and did a build.) I'm going to close this as a dup of #41716. @dylanede let me know if you disagree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants