Skip to content

Commit 3809fdd

Browse files
committed
Bump version to 0.4.1 and remove HOST_COMPILER_VERSION for now, focusing on the release channel fix for now.
1 parent dbca6b8 commit 3809fdd

File tree

4 files changed

+4
-18
lines changed

4 files changed

+4
-18
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ path = "src/driver.rs"
2525
[dependencies]
2626
clippy_config = { path = "clippy_config" }
2727
clippy_lints = { path = "clippy_lints" }
28-
rustc_tools_util = { path = "rustc_tools_util", version = "0.4.0" }
28+
rustc_tools_util = { path = "rustc_tools_util", version = "0.4.1" }
2929
tempfile = { version = "3.3", optional = true }
3030
termize = "0.1"
3131
color-print = "0.3.4"

rustc_tools_util/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rustc_tools_util"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
description = "small helper to generate version information for git packages"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"

rustc_tools_util/src/lib.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ macro_rules! get_version_info {
1212
let patch = std::env!("CARGO_PKG_VERSION_PATCH").parse::<u16>().unwrap();
1313
let crate_name = String::from(std::env!("CARGO_PKG_NAME"));
1414

15-
let host_compiler_version = std::option_env!("RUSTC_VERSION").map(str::to_string);
1615
let host_compiler = std::option_env!("RUSTC_RELEASE_CHANNEL").map(str::to_string);
1716
let commit_hash = std::option_env!("GIT_HASH").map(str::to_string);
1817
let commit_date = std::option_env!("COMMIT_DATE").map(str::to_string);
@@ -21,7 +20,6 @@ macro_rules! get_version_info {
2120
major,
2221
minor,
2322
patch,
24-
host_compiler_version,
2523
host_compiler,
2624
commit_hash,
2725
commit_date,
@@ -30,9 +28,8 @@ macro_rules! get_version_info {
3028
}};
3129
}
3230

33-
/// This macro can be used in `build.rs` to automatically set the needed
34-
/// environment values, namely `GIT_HASH`, `COMMIT_DATE`, `RUSTC_VERSION` and
35-
/// `RUSTC_RELEASE_CHANNEL`
31+
/// This macro can be used in `build.rs` to automatically set the needed environment values, namely `GIT_HASH`,
32+
/// `COMMIT_DATE` and `RUSTC_RELEASE_CHANNEL`
3633
#[macro_export]
3734
macro_rules! setup_version_info {
3835
() => {{
@@ -46,10 +43,6 @@ macro_rules! setup_version_info {
4643
$crate::get_commit_date().unwrap_or_default()
4744
);
4845
let compiler_version = $crate::get_compiler_version();
49-
println!(
50-
"cargo:rustc-env=RUSTC_VERSION={}",
51-
compiler_version.as_deref().unwrap_or_default()
52-
);
5346
println!(
5447
"cargo:rustc-env=RUSTC_RELEASE_CHANNEL={}",
5548
$crate::get_channel(compiler_version)
@@ -62,7 +55,6 @@ pub struct VersionInfo {
6255
pub major: u8,
6356
pub minor: u8,
6457
pub patch: u16,
65-
pub host_compiler_version: Option<String>,
6658
pub host_compiler: Option<String>,
6759
pub commit_hash: Option<String>,
6860
pub commit_date: Option<String>,
@@ -104,9 +96,6 @@ impl std::fmt::Debug for VersionInfo {
10496
if let Some(ref commit_date) = self.commit_date {
10597
write!(f, ", commit_date: \"{}\"", commit_date.trim())?;
10698
}
107-
if let Some(ref version) = self.host_compiler_version {
108-
write!(f, ", host_compiler_version: \"{}\"", version.trim())?;
109-
}
11099
if let Some(ref host_compiler) = self.host_compiler {
111100
write!(f, ", host_compiler: \"{}\"", host_compiler.trim())?;
112101
}

tests/versioncheck.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,4 @@ fn check_that_clippy_has_the_same_major_version_as_rustc() {
9595
fn check_host_compiler() {
9696
let version = rustc_tools_util::get_version_info!();
9797
assert_eq!(version.host_compiler, Some("nightly".to_string()));
98-
99-
let rustc_version = version.host_compiler_version.unwrap();
100-
assert!(rustc_version.contains("nightly"));
10198
}

0 commit comments

Comments
 (0)