Open cuviper opened 6 years ago
Same problem as https://github.com/rust-lang/rust/issues/49043.
triage: P-high
So, the ICE should be fixed, but the type inference failure perhaps not.
Confirmed, no ICE with rustc 1.26.0-nightly (75af15ee6 2018-03-20)
.
It still would be nice to root-cause the inference failure from afar, effected by the dependency update. But FWIW I did commit the necessary type annotations to rayon master already. For reproducing the issue, the prior branch head was rayon-rs/rayon@68aabe9e460f.
@cuviper hmm, i'm not able to reproduce this from that commit. I tried with a recent build and with nightly:
lunch-box. cargo +nightly build
Compiling cfg-if v0.1.2
Compiling nodrop v0.1.12
Compiling scopeguard v0.3.3
Compiling lazy_static v1.0.0
Compiling memoffset v0.2.1
Compiling rayon-core v1.4.0 (file:///home/nmatsakis/versioned/rust-1/regr/rayon/rayon-core)
Compiling libc v0.2.40
Compiling either v1.5.0
Compiling crossbeam-utils v0.2.2
Compiling arrayvec v0.4.7
Compiling crossbeam-epoch v0.3.1
Compiling rand v0.4.2
Compiling num_cpus v1.8.0
Compiling crossbeam-deque v0.2.0
Compiling rayon v1.0.0 (file:///home/nmatsakis/versioned/rust-1/regr/rayon)
Finished dev [unoptimized + debuginfo] target(s) in 8.18 secs
lunch-box. git show HEAD | head -1
commit 68aabe9e460f11d5ed936a3db6101a334df426a9
Oh, maybe it's testing.
Yeah, it's with cargo test --lib
. Still fails with rustc 1.27.0-nightly (fb44b4c0e 2018-04-04)
.
Although I'm not sure anymore if it's correct to call this a regression, or just a mysterious type ambiguity introduced by the dependency updates. Could the compiler give hints with cannot resolve `_: std::iter::Sum<&usize>`
, maybe listing some of the possible types it knows? At a glance, it seems like this could only be a usize
, but I guess some crate may have another Sum<&usize>
.
OK after some investigation I have successfully reproduced what @cuviper told me the whole time: that is, this is a very long-standing error, but the confusing thing is why the change to compiletest is triggering it.
triage: P-medium
downgrading since ICE has been addressed. The type inference change is potentially interesting and niko wouldlike to track it down, but its not P-high.
The rayon tests are encountering a new type inference failure, and with the latest nightly, an ICE.
With nightly-2018-03-07, it reports the same "type annotations required" error, but no ICE.
The error itself is new to us, as just a few days ago we had no problem in CI. I narrowed this down to an update to
compilertest_rs
, from 0.3.7 to 0.3.8, even though that crate is not directly involved in the test that has the error. With 0.3.7, even the currently nightly is fine. With 0.3.8, nightly-2018-03-15 has the error and ICE, and nightly-2018-03-07 back to 2018-01-28 just have the error. (Earlier than that, 0.3.8 doesn't compile at all due to differences in thetest
crate.)