Skip to content

Commit b5590ca

Browse files
committed
Only run test on 64-bit little endian architectures.
Hash value is different depenidng on bitness and endianess so we only run this test on 64-bit little endian platforms.
1 parent 6c1bc24 commit b5590ca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/cargo/core/source/source_id.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,13 @@ impl Ord for SourceKind {
617617
// you're able to restore the hash to its original value, please do so!
618618
// Otherwise please just leave a comment in your PR as to why the hash value is
619619
// changing and why the old value can't be easily preserved.
620+
//
621+
// The hash value differs depending on endianess and bit-width since Rust 1.45
622+
// (see https://github.com/rust-lang/rust/issues/74215). We run this test only
623+
// on 64-bit little-endian platforms which are most commonly used for
624+
// development and tested in CI.
620625
#[test]
626+
#[cfg(all(target_endian = "little", target_pointer_width = "64"))]
621627
fn test_cratesio_hash() {
622628
let config = Config::default().unwrap();
623629
let crates_io = SourceId::crates_io(&config).unwrap();

0 commit comments

Comments
 (0)