coeuvre / rust-2048

A 2048 clone with Piston game engine
MIT License
235 stars 40 forks source link

error: failed to select a version for `rusttype` #24

Open giappi opened 7 years ago

giappi commented 7 years ago

I cloned and built this project, and I get a error. Terminal Log:

Updating registry https://github.com/rust-lang/crates.io-index error: failed to select a version for rusttype (required by piston2d-gfx_graphics): all possible versions conflict with previously selected versions of rusttype version 0.2.0 in use by rusttype v0.2.0 possible versions to select: 0.2.1

How to fix it ? Thank your for support. Best Regards.

fanyer commented 7 years ago

@giappi This repo's dependences haven't been update, I've run through it with dependences as below:

[dependencies]
rustc-serialize = "0.3"
rand = "0.3.7"
piston_window = "0.64.0"
pistoncore-sdl2_window = "0.41.0"
piston2d-opengl_graphics = "0.42.0"

It should work

ghost commented 7 years ago

I'm getting this error too, latest version.

MrKiven commented 7 years ago

25 It works @UNST4BL3

HopperMCS commented 7 years ago

@MrKiven This is still an issue, unless there's a branch I need to switch to

HopperMCS commented 7 years ago

@MrKiven Successfully compiled (idk about run yet) literally just by deleting the Cargo.lock file

HopperMCS commented 7 years ago

screenshot from 2017-06-08 22-10-56

MrKiven commented 7 years ago

@MGageMorgan yeah

piedoom commented 7 years ago

Can confirm problem. @fanyer's solution + deleting cargo.lock fixed it.

soichih commented 5 years ago

(rust first timer here!) I was having the same problem. So I updated Cargo.toml (as @fanyer) suggested and removed Cargo.lock. I then did cargo build and I am seeing a lot of error messages like this.

error[E0658]: slice pattern syntax is experimental (see issue #23121)
   --> /home/hayashis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_truetype-0.2.4/src/lib.rs:606:13
    |
606 |         let [g1, g2] = if self.index_to_loc_format == 0 {
    |             ^^^^^^^^

error[E0658]: slice pattern syntax is experimental (see issue #23121)
   --> /home/hayashis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_truetype-0.2.4/src/lib.rs:608:17
    |
608 |             let [g1, g2] = read_ints!(2, u16, d);
    |                 ^^^^^^^^

error[E0658]: slice pattern syntax is experimental (see issue #23121)
   --> /home/hayashis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_truetype-0.2.4/src/lib.rs:624:13
    |
624 |         let [x0, y0, x1, y1] = read_ints!(4, i16, &self.data[g + 2..]);
    |             ^^^^^^^^^^^^^^^^

error[E0658]: slice pattern syntax is experimental (see issue #23121)
   --> /home/hayashis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_truetype-0.2.4/src/lib.rs:664:21
    |
664 |                 let [flags, gidx] = read_ints!(2, i16, comp);
    |                     ^^^^^^^^^^^^^

error[E0658]: slice pattern syntax is experimental (see issue #23121)
   --> /home/hayashis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_truetype-0.2.4/src/lib.rs:672:29
    |
672 |                         let [a, b] = read_ints!(2, i16, comp);
    |                             ^^^^^^

error[E0658]: slice pattern syntax is experimental (see issue #23121)
   --> /home/hayashis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_truetype-0.2.4/src/lib.rs:693:25
    |
693 |                     let [a, b] = read_ints!(2, i16, comp);
    |                         ^^^^^^

error[E0658]: slice pattern syntax is experimental (see issue #23121)
   --> /home/hayashis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_truetype-0.2.4/src/lib.rs:701:25
    |
701 |                     let [a, b, c, d] = read_ints!(4, i16, comp);
    |                         ^^^^^^^^^^^^

error[E0658]: slice pattern syntax is experimental (see issue #23121)
    --> /home/hayashis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_truetype-0.2.4/src/lib.rs:1001:17
     |
1001 |             let [advance_width, left_side_bearing] = read_ints!(2, i16, data);
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0658]: slice pattern syntax is experimental (see issue #23121)
    --> /home/hayashis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_truetype-0.2.4/src/lib.rs:1079:13
     |
1079 |         let [ascent, descent, line_gap] = read_ints!(3, i16, &hhea[4..]);
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0658]: slice pattern syntax is experimental (see issue #23121)
    --> /home/hayashis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_truetype-0.2.4/src/lib.rs:1108:17
     |
1108 |             let [a, b] = read_ints!(2, i16, &hhea[4..]);
     |                 ^^^^^^

error: aborting due to 10 previous errors

error: Could not compile `stb_truetype`.
warning: build failed, waiting for other jobs to finish...
error: build failed