tzaeru / rust-audio-analysis

Moved to GitLab! RAA! RAA is WIP. Don't look.
https://gitlab.com/tzaeru/rust-audio-analysis
MIT License
28 stars 0 forks source link

error: numeric fields in struct expressions are unstable (see issue #35626) #1

Open scottstensland opened 6 years ago

scottstensland commented 6 years ago

cannot compile getting


stens@cameroon ~/src/github.com/tzaeru/rust-audio-analysis $ rustc --version
rustc 1.18.0

stens@cameroon ~/src/github.com/tzaeru/rust-audio-analysis $ cargo check
   Compiling lazy_static v0.2.9
   Compiling libc v0.2.32
   Compiling num-traits v0.1.40
   Compiling bitflags v0.7.0
   Compiling num-integer v0.1.35
   Compiling num-iter v0.1.34
   Compiling num v0.1.40
   Compiling portaudio v0.7.0
warning: redundant linker flag specified for library `portaudio`

   Compiling audio-analysis v0.1.0 (file:///home/stens/src/github.com/tzaeru/rust-audio-analysis)
error: numeric fields in struct expressions are unstable (see issue #35626)
   --> src/analysis/pa_interface.rs:158:68
    |
158 |         let device_info = port_audio.device_info(pa::DeviceIndex { 0: self.device }).unwrap();
    |                                                                    ^^^^^^^^^^^^^^

error: numeric fields in struct expressions are unstable (see issue #35626)
   --> src/analysis/pa_interface.rs:160:79
    |
160 |         let input_params = pa::StreamParameters::<f32>::new(pa::DeviceIndex { 0: self.device },
    |                                                                               ^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

error: Could not compile `audio-analysis`.
GabrielMajeri commented 6 years ago

You need Rust version 1.19 or newer for this to work. I'm guessing you just use the version that came with your Linux distro.

You can use rustup to update to a newer version of Rust.