@@ -392,25 +392,25 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
392
392
}
393
393
}
394
394
395
- // When hashing a type this ends up affecting properties like symbol names. We
396
- // want these symbol names to be calculated independent of other factors like
397
- // what architecture you're compiling *from*.
398
- //
399
- // The hashing just uses the standard `Hash` trait, but the implementations of
400
- // `Hash` for the `usize` and `isize` types are *not* architecture independent
401
- // (e.g. they has 4 or 8 bytes). As a result we want to avoid `usize` and
402
- // `isize` completely when hashing. To ensure that these don't leak in we use a
403
- // custom hasher implementation here which inflates the size of these to a `u64`
404
- // and `i64`.
405
- //
406
- // The same goes for endianess: We always convert multi-byte integers to little
407
- // endian before hashing.
408
- struct ArchIndependentHasher < H > {
395
+ /// When hashing a type this ends up affecting properties like symbol names. We
396
+ /// want these symbol names to be calculated independent of other factors like
397
+ /// what architecture you're compiling *from*.
398
+ ///
399
+ /// The hashing just uses the standard `Hash` trait, but the implementations of
400
+ /// `Hash` for the `usize` and `isize` types are *not* architecture independent
401
+ /// (e.g. they has 4 or 8 bytes). As a result we want to avoid `usize` and
402
+ /// `isize` completely when hashing. To ensure that these don't leak in we use a
403
+ /// custom hasher implementation here which inflates the size of these to a `u64`
404
+ /// and `i64`.
405
+ ///
406
+ /// The same goes for endianess: We always convert multi-byte integers to little
407
+ /// endian before hashing.
408
+ pub struct ArchIndependentHasher < H > {
409
409
inner : H ,
410
410
}
411
411
412
412
impl < H > ArchIndependentHasher < H > {
413
- fn new ( inner : H ) -> ArchIndependentHasher < H > {
413
+ pub fn new ( inner : H ) -> ArchIndependentHasher < H > {
414
414
ArchIndependentHasher { inner : inner }
415
415
}
416
416
}
0 commit comments