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

error: type annotations required: cannot resolve <f32 as core::ops::Add<_>>::Output == f32 [E0284] #38

Closed
andersk opened this issue Mar 31, 2015 · 0 comments · Fixed by #39

Comments

@andersk
Copy link
Contributor

andersk commented Mar 31, 2015

With today’s rust-nightly (rust-lang/rust@6cf3b0b), rand no longer builds. It was fine in yesterday’s nightly (rust-lang/rust@d8be84e), so I’m guessing the difference is due to rust-lang/rust#23673.

$ rustc --version
rustc 1.0.0-dev (built 2015-03-31)
$ cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling libc v0.1.4
   Compiling log v0.3.1
   Compiling rand v0.3.3 (file:///home/anders/rust/rand)
src/distributions/range.rs:156:17: 156:44 error: type annotations required: cannot resolve `<f32 as core::ops::Add<_>>::Output == f32` [E0284]
src/distributions/range.rs:156                 r.low + r.range * rng.gen()
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/distributions/range.rs:145:1: 160:2 note: in expansion of float_impl!
src/distributions/range.rs:162:1: 162:20 note: expansion site
error: aborting due to previous error
Could not compile `rand`.

To learn more, run the command again with --verbose.
andersk added a commit to andersk/rand-rs that referenced this issue Mar 31, 2015
vks pushed a commit to vks/rand that referenced this issue Apr 9, 2018
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

Successfully merging a pull request may close this issue.

1 participant