Skip to content

Commit

Permalink
Get rustc version in project context
Browse files Browse the repository at this point in the history
`rustup` determines which toolchain to use from a `rust-toolchain.toml`
or `rust-toolchain` file in the project’s directory if it exists.

See: https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file
  • Loading branch information
l2dy authored Aug 30, 2024
1 parent f134e61 commit 18e8461
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class RustProjectSettingsPanel(
val toolchain = pathToToolchain?.let { RsToolchainProvider.getToolchain(it) }
val rustc = toolchain?.rustc()
val rustup = toolchain?.rustup
val rustcVersion = rustc?.queryVersion()?.semver
val rustcVersion = rustc?.queryVersion(cargoProjectDir)?.semver
val stdlibLocation = rustc?.getStdlibFromSysroot(cargoProjectDir)?.presentableUrl
Triple(rustcVersion, stdlibLocation, rustup != null)
},
Expand Down

0 comments on commit 18e8461

Please sign in to comment.