diff options
| author | Philipp Krones <hello@philkrones.com> | 2025-07-25 15:54:22 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2025-07-25 15:54:22 +0200 |
| commit | a0b18b3318462e630a7689217c192675bb6b2b7b (patch) | |
| tree | c1188a69564526233f9d8540bc3ddb907b427252 /src/tools/clippy/rustc_tools_util | |
| parent | b56aaec52bc0fa35591a872fb4aac81f606e265c (diff) | |
| parent | 1db89a1b1ca87f24bf22d0bad21d14b2d81b3e99 (diff) | |
Merge commit '1db89a1b1ca87f24bf22d0bad21d14b2d81b3e99' into clippy-subtree-update
Diffstat (limited to 'src/tools/clippy/rustc_tools_util')
| -rw-r--r-- | src/tools/clippy/rustc_tools_util/src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/clippy/rustc_tools_util/src/lib.rs b/src/tools/clippy/rustc_tools_util/src/lib.rs index b45edf23455..194ed84d04c 100644 --- a/src/tools/clippy/rustc_tools_util/src/lib.rs +++ b/src/tools/clippy/rustc_tools_util/src/lib.rs @@ -157,7 +157,8 @@ pub fn get_commit_date() -> Option<String> { #[must_use] pub fn get_compiler_version() -> Option<String> { - get_output("rustc", &["-V"]) + let compiler = std::option_env!("RUSTC").unwrap_or("rustc"); + get_output(compiler, &["-V"]) } #[must_use] @@ -172,6 +173,8 @@ pub fn get_channel(compiler_version: Option<String>) -> String { return String::from("beta"); } else if rustc_output.contains("nightly") { return String::from("nightly"); + } else if rustc_output.contains("dev") { + return String::from("dev"); } } |
