diff --git a/src/cargo/core/source/source_id.rs b/src/cargo/core/source/source_id.rs index a1a7e3695d8..2f95e10e839 100644 --- a/src/cargo/core/source/source_id.rs +++ b/src/cargo/core/source/source_id.rs @@ -617,7 +617,12 @@ impl Ord for SourceKind { // you're able to restore the hash to its original value, please do so! // Otherwise please just leave a comment in your PR as to why the hash value is // changing and why the old value can't be easily preserved. +// +// The hash value depends on endianness and bit-width, so we only run this test on +// little-endian 64-bit CPUs (such as x86-64 and ARM64) where it matches the +// well-known value. #[test] +#[cfg(all(target_endian = "little", target_pointer_width = "64"))] fn test_cratesio_hash() { let config = Config::default().unwrap(); let crates_io = SourceId::crates_io(&config).unwrap();