chris-morgan / rust-http

Completely OBSOLETE Rust HTTP library (server and client)
Other
390 stars 110 forks source link

testing nickel.rs and get this build error on rust-http #176

Closed talnetd closed 9 years ago

talnetd commented 9 years ago

cargo 0.0.1-pre-nightly (56852db 2014-11-14 23:33:33 +0000) rustc 0.13.0-nightly (d91a015ab 2014-11-14 23:37:27 +0000)

did these $ cargo new myblabla.com --bin $ cd myblabla.com $ cargo build

then this. screen shot 2014-11-17 at 3 15 41 am

Ogeon commented 9 years ago

Sounds strange that this would happen on a clean project, but have you tried to run cargo update to update your dependencies? Those trait bounds were added in #175.

talnetd commented 9 years ago

Would try and will post result back.

Thanks for the care.

talnetd commented 9 years ago
~/study/nickel_demo(master ✗) cargo update
    Updating git repository `https://github.com/nickel-org/nickel.rs.git`
    Updating git repository `https://github.com/nickel-org/groupable-rs`
    Updating git repository `https://github.com/nickel-org/rust-mustache.git`
    Updating git repository `https://github.com/nickel-org/anymap.git`
    Updating git repository `https://github.com/nickel-org/rust-http.git`
    Updating git repository `https://github.com/nickel-org/rust-url.git`
    Updating git repository `https://github.com/sfackler/rust-openssl.git`
    Updating git repository `https://github.com/lifthrasiir/rust-encoding`
    Updating git repository `https://github.com/DiamondLovesYou/libressl-pnacl-sys.git`
    Updating git repository `https://github.com/DiamondLovesYou/cargo-pnacl-helper.git`
    Updating git repository `https://github.com/alexcrichton/pkg-config-rs`
~/study/nickel_demo(master ✗) cargo build
   Compiling openssl-sys v0.0.1 (https://github.com/sfackler/rust-openssl.git#c41baaba)
   Compiling http v0.1.0-pre (https://github.com/nickel-org/rust-http.git#d3589464)
   Compiling openssl v0.0.1 (https://github.com/sfackler/rust-openssl.git#c41baaba)
src/http/common.rs:46:35: 46:43 error: attempt to bound type parameter with a nonexistent trait `Unsigned`
src/http/common.rs:46 pub fn read_decimal<R: Reader, N: Unsigned + NumCast + PartialOrd + CheckedMul + CheckedAdd>
                                                        ^~~~~~~~
src/http/common.rs:46:46: 46:53 error: attempt to bound type parameter with a nonexistent trait `NumCast`
src/http/common.rs:46 pub fn read_decimal<R: Reader, N: Unsigned + NumCast + PartialOrd + CheckedMul + CheckedAdd>
                                                                   ^~~~~~~
src/http/common.rs:46:69: 46:79 error: attempt to bound type parameter with a nonexistent trait `CheckedMul`
src/http/common.rs:46 pub fn read_decimal<R: Reader, N: Unsigned + NumCast + PartialOrd + CheckedMul + CheckedAdd>
                                                                                          ^~~~~~~~~~
src/http/common.rs:46:82: 46:92 error: attempt to bound type parameter with a nonexistent trait `CheckedAdd`
src/http/common.rs:46 pub fn read_decimal<R: Reader, N: Unsigned + NumCast + PartialOrd + CheckedMul + CheckedAdd>
                                                                                                       ^~~~~~~~~~
src/http/common.rs:92:39: 92:47 error: attempt to bound type parameter with a nonexistent trait `Unsigned`
src/http/common.rs:92 pub fn read_hexadecimal<R: Reader, N: Unsigned + NumCast + PartialOrd + CheckedMul + CheckedAdd>
                                                            ^~~~~~~~
src/http/common.rs:92:50: 92:57 error: attempt to bound type parameter with a nonexistent trait `NumCast`
src/http/common.rs:92 pub fn read_hexadecimal<R: Reader, N: Unsigned + NumCast + PartialOrd + CheckedMul + CheckedAdd>
                                                                       ^~~~~~~
src/http/common.rs:92:73: 92:83 error: attempt to bound type parameter with a nonexistent trait `CheckedMul`
src/http/common.rs:92 pub fn read_hexadecimal<R: Reader, N: Unsigned + NumCast + PartialOrd + CheckedMul + CheckedAdd>
                                                                                              ^~~~~~~~~~
src/http/common.rs:92:86: 92:96 error: attempt to bound type parameter with a nonexistent trait `CheckedAdd`
src/http/common.rs:92 pub fn read_hexadecimal<R: Reader, N: Unsigned + NumCast + PartialOrd + CheckedMul + CheckedAdd>
                                                                                                           ^~~~~~~~~~
error: aborting due to 8 previous errors
Could not compile `http`.

To learn more, run the command again with --verbose.
~/study/nickel_demo(master ✗)

Here is the result. I am not making this hard for me. I only came here coz the log show errors on this lib but the main thing I am willing to do is nickel.rs. Please cure this if you have some dosage.

reem commented 9 years ago

@thanyawzinmin Very easy to miss, but actually nickel has forked all of its dependencies and pulls them in from their forks. Their fork of rust-http is out of date and doesn't have the latest necessary fix, like the one provided in #175.

Since this is actually fixed in rust-http, I suggest opening up an issue in https://github.com/nickel-org/rust-http, even though it looks like there is an open PR to bring in upstream fixes.

Sorry that we couldn't be of more help or fix this directly, but this it out of our hands now so I'm closing.

talnetd commented 9 years ago

That's ok bro. I will inform them.