- 
                Notifications
    
You must be signed in to change notification settings  - Fork 984
 
Open
Labels
Description
Verification
- I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue and found no duplicates.
 - I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.
 
Problem
In rust-lang/cargo#16149 a user was trying to figure out how to do rustup run with nightly and tried:
$ rustup +nightly run cargo miri test
error: toolchain 'cargo' is not installedFrom the user:
... etc. I found many mentions of
cargo +toolchainon 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 torun, notrustuporcargo..
Made worse by the fact that rustup accepts a toolchain parameter like cargo does
Steps
- Run 
rustup +nightly run cargo -h 
Possible Solution(s)
Option 1: Improve the diagnostic by checking if the toolchain name is a command and suggesting:
rustup run nightly cargo -h(if they specified a toolchain)rustup run <default> cargo -h(if they didn't specify a toolchain)
Option 2: Hack up the command-line in such a way as to make this work
Notes
No response
Rustup version
rustup 1.28.2 (e4f3ad6f8 2025-04-28)Installed toolchains
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/epage/.rustup
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu (active, default)
beta-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu
nightly-2023-11-13-x86_64-unknown-linux-gnu
nightly-2024-06-03-x86_64-unknown-linux-gnu
nightly-2024-09-10-x86_64-unknown-linux-gnu
nightly-2024-10-19-x86_64-unknown-linux-gnu
nightly-2025-01-27-x86_64-unknown-linux-gnu
nightly-2025-04-02-x86_64-unknown-linux-gnu
nightly-2025-06-26-x86_64-unknown-linux-gnu
1.0.0-x86_64-unknown-linux-gnu
1.48-x86_64-unknown-linux-gnu
1.48.0-x86_64-unknown-linux-gnu
1.56.0-x86_64-unknown-linux-gnu
1.57.0-x86_64-unknown-linux-gnu
1.58.0-x86_64-unknown-linux-gnu
1.60.0-x86_64-unknown-linux-gnu
1.64-x86_64-unknown-linux-gnu
1.64.0-x86_64-unknown-linux-gnu
1.65-x86_64-unknown-linux-gnu
1.65.0-x86_64-unknown-linux-gnu
1.66-x86_64-unknown-linux-gnu
1.66.0-x86_64-unknown-linux-gnu
1.70-x86_64-unknown-linux-gnu
1.70.0-x86_64-unknown-linux-gnu
1.71-x86_64-unknown-linux-gnu
1.71.0-x86_64-unknown-linux-gnu
1.71.1-x86_64-unknown-linux-gnu
1.72-x86_64-unknown-linux-gnu
1.74-x86_64-unknown-linux-gnu
1.75-x86_64-unknown-linux-gnu
1.76-x86_64-unknown-linux-gnu
1.80-x86_64-unknown-linux-gnu
1.80.1-x86_64-unknown-linux-gnu
1.81-x86_64-unknown-linux-gnu
1.83-x86_64-unknown-linux-gnu
1.83.0-x86_64-unknown-linux-gnu
1.84-x86_64-unknown-linux-gnu
1.85-x86_64-unknown-linux-gnu
1.86-x86_64-unknown-linux-gnu
1.86.0-x86_64-unknown-linux-gnu
1.88-x86_64-unknown-linux-gnu
1.89-x86_64-unknown-linux-gnu
1.90-x86_64-unknown-linux-gnu
stage1
active toolchain
----------------
name: stable-x86_64-unknown-linux-gnu
active because: it's the default toolchain
installed targets:
  aarch64-apple-darwin
  i686-unknown-linux-gnu
  i686-unknown-linux-musl
  powerpc-unknown-linux-gnu
  wasm32-unknown-unknown
  x86_64-pc-windows-gnu
  x86_64-pc-windows-msvc
  x86_64-unknown-linux-gnu
  x86_64-unknown-linux-musl
  x86_64-unknown-noneOS version
Linux dross 6.16.3-76061603-generic #202508231538~1758561135~22.04~171c8de SMP PREEMPT_DYNAMIC Mon S x86_64 x86_64 x86
_64 GNU/Linuxrami3lrami3l