Skip to content

Commit 081661b

Browse files
committed
disregard what we believe is supported in cargo for hash type
1 parent 6ff7a3e commit 081661b

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

compiler/rustc_session/src/options.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,11 +1295,7 @@ mod parse {
12951295
) -> bool {
12961296
match v.and_then(|s| SourceFileHashAlgorithm::from_str(s).ok()) {
12971297
Some(hash_kind) => {
1298-
if hash_kind.supported_in_cargo() {
1299-
*slot = Some(hash_kind);
1300-
} else {
1301-
return false;
1302-
}
1298+
*slot = Some(hash_kind);
13031299
}
13041300
_ => return false,
13051301
}

compiler/rustc_span/src/lib.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,15 +1400,6 @@ pub enum SourceFileHashAlgorithm {
14001400
Blake3,
14011401
}
14021402

1403-
impl SourceFileHashAlgorithm {
1404-
pub fn supported_in_cargo(&self) -> bool {
1405-
match self {
1406-
Self::Md5 | Self::Sha1 => false,
1407-
Self::Sha256 | Self::Blake3 => true,
1408-
}
1409-
}
1410-
}
1411-
14121403
impl Display for SourceFileHashAlgorithm {
14131404
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
14141405
f.write_str(match self {

0 commit comments

Comments
 (0)