-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Problem
I today for the first time tried to run MIRI and discovered I needed to use an unstable toolchain. I figured out how that can be installed using rustup, but then got this:
$ cargo +nightly miri test
error: no such command: `+nightly`
help: invoke `cargo` through `rustup` to handle `+toolchain` directives
Based on this, I tried all kinds of things (including reading through documentation), yet it took me probably 20 minutes to figure out the correct syntax. I tried:
rustup +toolchain run cargo miri test
rustup run +toolchain cargo miri test
... etc. I found many mentions of cargo +toolchain on the net, but it was really quite hard to find the syntax to actually get this to run. One reason is that as a beginner I really had no idea if I was looking for an option to run, not rustup or cargo..
Proposed Solution
Now, having found that the correct invocation is rustup run nightly cargo miri test, I think it would have been most helpful if the "help:" message would have given a bigger hint, maybe something like
help: Use `rustup run <toolchain> cargo ...` instead of `cargo +toolchain`.
, or even pointing me, the new user, to rustup run --help.
Notes
Place in code:
Line 294 in 4f15cc8
| help: invoke `cargo` through `rustup` to handle `+toolchain` directives{script_suggestion}", |
A related issue which lead to some changes to make this supposedly easier to discover: #8058