Ask questionsFollowing Getting Started hits error

<!-- Thank you for filing a bug report! 🐛 -->

Expected Behaviour

Following the getting started build from, I expected to see the build getting started project.

Example & Steps To Reproduce

  1. I followed the getting started guide here:
  2. I didn't have rust installed (yes, this was my first time), so I ran brew install rust (and brew install spirv-tools)
  3. I then ran cargo run --bin example-runner-wgpu
  4. It crashed with the error:
error[E0277]: `[&str; 5]` is not an iterator
  --> examples/runners/wgpu/
30 |           .args([
   |  _______________^
31 | |             "run",
32 | |             "--release",
33 | |             "-p",
34 | |             "example-runner-wgpu-builder",
35 | |             "--target-dir",
36 | |         ])
   | |_________^ expected an implementor of trait `IntoIterator`
   = note: the trait bound `[&str; 5]: IntoIterator` is not satisfied
   = note: required because of the requirements on the impl of `IntoIterator` for `[&str; 5]`
help: consider borrowing here
30 |         .args(&[
31 |             "run",
32 |             "--release",
33 |             "-p",
34 |             "example-runner-wgpu-builder",
35 |             "--target-dir",

System Info

Mac OSX 11.4 rustc -V: rustc 1.52.1 spir-val --version: comand not found: spir-val -- not sure how to get that going?

Perhaps it's because I don't have my machine configured properly yet? ... but I also see no way of working out how to configure it.


Answer questions DJMcNab

I suspect the root cause issue is brew install rust.

rustc -V giving rustc 1.52.1 suggests that your setup is ignoring the rust-toolchain file at the root, presumably because you are not using rustup.

However, that being said, IntoIterator for [&str; 5] should be present in that version of rustc, so something else strange is afoot - that is, the rustc -V line is extremely confusing

I'd recommend installing rustup from and trying again.


Related questions

No questions were found.
Github User Rank List