You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen a couple other issues for this section in particular, but I tried compiling the code from the repo as is and I got the following error:
➜ ch2-mandelbrot git:(1st-edition) ✗ cargo run
Compiling autocfg v1.0.0
Compiling num-traits v0.2.12
Compiling num-integer v0.1.43
Compiling num-bigint v0.3.0
Compiling num-rational v0.3.0
Compiling num-iter v0.1.41
Compiling num-complex v0.3.0
Compiling num v0.3.0
Compiling ch2-mandelbrot v0.1.0 (/Users/ethanarrowood/Documents/Programming/rust/rust-in-action/code/ch2/ch2-mandelbrot)
error[E0658]: exclusive range pattern syntax is experimental
--> src/main.rs:55:9
|
55 | 0..2 => ' ',
| ^^^^
|
= note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
error[E0658]: exclusive range pattern syntax is experimental
--> src/main.rs:56:9
|
56 | 2..5 => '.',
| ^^^^
|
= note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
error[E0658]: exclusive range pattern syntax is experimental
--> src/main.rs:57:9
|
57 | 5..10 => '•',
| ^^^^^
|
= note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
error[E0658]: exclusive range pattern syntax is experimental
--> src/main.rs:58:9
|
58 | 11..30 => '*',
| ^^^^^^
|
= note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
error[E0658]: exclusive range pattern syntax is experimental
--> src/main.rs:59:9
|
59 | 30..100 => '+',
| ^^^^^^^
|
= note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
error[E0658]: exclusive range pattern syntax is experimental
--> src/main.rs:60:9
|
60 | 100..200 => 'x',
| ^^^^^^^^
|
= note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
error[E0658]: exclusive range pattern syntax is experimental
--> src/main.rs:61:9
|
61 | 200..400 => '$',
| ^^^^^^^^
|
= note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
warning: unnecessary parentheses around assigned value
--> src/main.rs:20:23
|
20 | let x_percent = (img_x as f64 / width as f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses
|
= note: `#[warn(unused_parens)]` on by default
warning: unnecessary parentheses around assigned value
--> src/main.rs:21:23
|
21 | let y_percent = (img_y as f64 / height as f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses
error: aborting due to 7 previous errors; 2 warnings emitted
For more information about this error, try `rustc --explain E0658`.
error: could not compile `ch2-mandelbrot`
To learn more, run the command again with --verbose.
I also ran rustup update stable earlier; do I need to be on a different rust version to run this one? From the referenced github issue it states I should add #![feature(exclusive_range_pattern)] to the top of the file and install the nightly build of rust to run it.
The text was updated successfully, but these errors were encountered:
I've seen a couple other issues for this section in particular, but I tried compiling the code from the repo as is and I got the following error:
I also ran
rustup update stable
earlier; do I need to be on a different rust version to run this one? From the referenced github issue it states I should add#![feature(exclusive_range_pattern)]
to the top of the file and install the nightly build of rust to run it.The text was updated successfully, but these errors were encountered: