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

can not build #2

Open
b1tg opened this issue Dec 23, 2018 · 0 comments
Open

can not build #2

b1tg opened this issue Dec 23, 2018 · 0 comments

Comments

@b1tg
Copy link

b1tg commented Dec 23, 2018

version

bash-3.2$ cargo --version
cargo 1.32.0-nightly (b3d0b2e54 2018-11-15)
bash-3.2$ rustc --version
rustc 1.32.0-nightly (0c999ed13 2018-12-03)
bash-3.2$

error msg

cargo run -- -p 3333 test_data/flagfromserver.torrent                           master ✔
  Downloaded hyper v0.5.2
  Downloaded rust-crypto v0.2.31
  Downloaded getopts v0.2.11
  Downloaded url v0.2.35
  Downloaded rand v0.3.8
  Downloaded bencode v0.1.12
  Downloaded time v0.1.26
  Downloaded rustc-serialize v0.3.15
  Downloaded libc v0.1.8
  Downloaded gcc v0.3.8
  Downloaded httparse v0.1.4
  Downloaded mime v0.0.11
  Downloaded cookie v0.1.21
  Downloaded unicase v0.1.0
  Downloaded num_cpus v0.2.6
  Downloaded openssl v0.6.2
  Downloaded log v0.3.1
  Downloaded matches v0.1.2
  Downloaded byteorder v0.3.10
  Downloaded num v0.1.25
  Downloaded openssl-sys v0.6.2
  Downloaded lazy_static v0.1.11
  Downloaded bitflags v0.1.1
  Downloaded pkg-config v0.3.4
   Compiling pkg-config v0.3.4
   Compiling gcc v0.3.8
   Compiling libc v0.1.8
   Compiling lazy_static v0.1.11
   Compiling bitflags v0.1.1
   Compiling matches v0.1.2
   Compiling rustc-serialize v0.3.15
   Compiling unicase v0.1.0
error[E0642]: patterns aren't allowed in methods without bodies
   --> /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.15/src/serialize.rs:145:45
    |
145 |                                             &f_name: &str,
    |                                             ^^^^^^^

   Compiling byteorder v0.3.10
   Compiling traitobject v0.0.1
   Compiling httparse v0.1.4
error[E0277]: the size for values of type `Self` cannot be known at compilation time
   --> /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.15/src/serialize.rs:201:5
    |
201 |     fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `Self`
    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
    = help: consider adding a `where Self: std::marker::Sized` bound
    = note: required by `std::result::Result`

   Compiling typeable v0.1.2
error: aborting due to 2 previous errors

Some errors occurred: E0277, E0642.
For more information about an error, try `rustc --explain E0277`.
   Compiling rand v0.3.8
error: Could not compile `rustc-serialize`.
warning: build failed, waiting for other jobs to finish...
error[E0277]: the size for values of type `Self` cannot be known at compilation time
  --> /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.8/src/distributions/range.rs:83:5
   |
83 |     fn construct_range(low: Self, high: Self) -> Range<Self>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `Self`
   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
   = help: consider adding a `where Self: std::marker::Sized` bound
note: required by `distributions::range::Range`
  --> /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.8/src/distributions/range.rs:50:1
   |
50 | pub struct Range<X> {
   | ^^^^^^^^^^^^^^^^^^^

error[E0277]: the size for values of type `Self` cannot be known at compilation time
  --> /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.8/src/distributions/range.rs:87:5
   |
87 |     fn sample_range<R: Rng>(r: &Range<Self>, rng: &mut R) -> Self;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `Self`
   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
   = help: consider adding a `where Self: std::marker::Sized` bound
note: required by `distributions::range::Range`
  --> /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.8/src/distributions/range.rs:50:1
   |
50 | pub struct Range<X> {
   | ^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
error: Could not compile `rand`.

To learn more, run the command again with --verbose.
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