From 081661b78d44bd41f8a1fd46b9ed11823cd7811e Mon Sep 17 00:00:00 2001 From: Jacob Kiesel Date: Sat, 28 Sep 2024 17:38:28 -0600 Subject: [PATCH] disregard what we believe is supported in cargo for hash type --- compiler/rustc_session/src/options.rs | 6 +----- compiler/rustc_span/src/lib.rs | 9 --------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index c32cf3d015f..b78d370bce0 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1295,11 +1295,7 @@ pub(crate) fn parse_cargo_src_file_hash( ) -> bool { match v.and_then(|s| SourceFileHashAlgorithm::from_str(s).ok()) { Some(hash_kind) => { - if hash_kind.supported_in_cargo() { - *slot = Some(hash_kind); - } else { - return false; - } + *slot = Some(hash_kind); } _ => return false, } diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index 5ab1caaa220..b55465ddef7 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -1400,15 +1400,6 @@ pub enum SourceFileHashAlgorithm { Blake3, } -impl SourceFileHashAlgorithm { - pub fn supported_in_cargo(&self) -> bool { - match self { - Self::Md5 | Self::Sha1 => false, - Self::Sha256 | Self::Blake3 => true, - } - } -} - impl Display for SourceFileHashAlgorithm { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(match self {