First rocket program, first error


#1

hi just try example of Rocket from https://rocket.rs/guide/quickstart/#running-examples
and i got Could not compile state ,

ruby$ cargo install state
    Updating registry `https://github.com/rust-lang/crates.io-index`
  Installing state v0.3.1
error: specified package has no binaries
Oderlo-pro:hello_world ruby$ cargo run
   Compiling futures v0.1.15
   Compiling language-tags v0.2.2
   Compiling matches v0.1.6
   Compiling ordermap v0.2.12
   Compiling version_check v0.1.3
   Compiling smallvec v0.4.3
   Compiling libc v0.2.30
   Compiling state v0.3.1
error[E0554]: #[feature] may not be used on the stable release channel
 --> /Users/ruby/.cargo/registry/src/github.com-1ecc6299db9ec823/state-0.3.1/src/lib.rs:1:1
  |
1 | #![feature(const_fn, drop_types_in_const)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

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

thanks ^^


#2

Rocket works only on the nightly channel (ie compiler version), so you’ll need to switch to that instead of stable.

https://rocket.rs/guide/getting-started/ has instructions to do just that.