We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
+toolchain --version
1 parent d708b11 commit 910b6aeCopy full SHA for 910b6ae
src/cli/rustup_mode.rs
@@ -77,7 +77,14 @@ pub fn main() -> Result<utils::ExitCode> {
77
fn rustc_version() -> std::result::Result<String, Box<dyn std::error::Error>> {
78
let cfg = &mut common::set_globals(false, true)?;
79
let cwd = std::env::current_dir()?;
80
+
81
+ if let Some(t) = process().args().find(|x| x.starts_with('+')) {
82
+ debug!("Fetching rustc version from toolchain `{}`", t);
83
+ cfg.set_toolchain_override(&t[1..]);
84
+ }
85
86
let toolchain = cfg.find_or_install_override_toolchain_or_default(&cwd)?.0;
87
88
Ok(toolchain.rustc_version())
89
}
90
0 commit comments