@@ -15,7 +15,7 @@ use cmp;
1515use hash:: { Hash , Hasher } ;
1616use iter:: { Iterator , ExactSizeIterator } ;
1717use marker:: { Copy , Send , Sync , Sized , self } ;
18- use mem:: { min_align_of , size_of} ;
18+ use mem:: { align_of , size_of} ;
1919use mem;
2020use num:: wrapping:: OverflowingOps ;
2121use ops:: { Deref , DerefMut , Drop } ;
@@ -553,9 +553,9 @@ fn calculate_allocation(hash_size: usize, hash_align: usize,
553553 vals_align) ;
554554 let ( end_of_vals, oflo2) = vals_offset. overflowing_add ( vals_size) ;
555555
556- let min_align = cmp:: max ( hash_align, cmp:: max ( keys_align, vals_align) ) ;
556+ let align = cmp:: max ( hash_align, cmp:: max ( keys_align, vals_align) ) ;
557557
558- ( min_align , hash_offset, end_of_vals, oflo || oflo2)
558+ ( align , hash_offset, end_of_vals, oflo || oflo2)
559559}
560560
561561#[ test]
@@ -597,9 +597,9 @@ impl<K, V> RawTable<K, V> {
597597 // factored out into a different function.
598598 let ( malloc_alignment, hash_offset, size, oflo) =
599599 calculate_allocation (
600- hashes_size, min_align_of :: < u64 > ( ) ,
601- keys_size, min_align_of :: < K > ( ) ,
602- vals_size, min_align_of :: < V > ( ) ) ;
600+ hashes_size, align_of :: < u64 > ( ) ,
601+ keys_size, align_of :: < K > ( ) ,
602+ vals_size, align_of :: < V > ( ) ) ;
603603
604604 assert ! ( !oflo, "capacity overflow" ) ;
605605
@@ -630,8 +630,8 @@ impl<K, V> RawTable<K, V> {
630630 let buffer = * self . hashes as * mut u8 ;
631631 let ( keys_offset, vals_offset, oflo) =
632632 calculate_offsets ( hashes_size,
633- keys_size, min_align_of :: < K > ( ) ,
634- min_align_of :: < V > ( ) ) ;
633+ keys_size, align_of :: < K > ( ) ,
634+ align_of :: < V > ( ) ) ;
635635 debug_assert ! ( !oflo, "capacity overflow" ) ;
636636 unsafe {
637637 RawBucket {
@@ -1005,9 +1005,9 @@ impl<K, V> Drop for RawTable<K, V> {
10051005 let keys_size = self . capacity * size_of :: < K > ( ) ;
10061006 let vals_size = self . capacity * size_of :: < V > ( ) ;
10071007 let ( align, _, size, oflo) =
1008- calculate_allocation ( hashes_size, min_align_of :: < u64 > ( ) ,
1009- keys_size, min_align_of :: < K > ( ) ,
1010- vals_size, min_align_of :: < V > ( ) ) ;
1008+ calculate_allocation ( hashes_size, align_of :: < u64 > ( ) ,
1009+ keys_size, align_of :: < K > ( ) ,
1010+ vals_size, align_of :: < V > ( ) ) ;
10111011
10121012 debug_assert ! ( !oflo, "should be impossible" ) ;
10131013
0 commit comments