]> git.lizzy.rs Git - rust.git/commit
Make `align_of` behave like `min_align_of`.
authorHuon Wilson <dbau.pp+github@gmail.com>
Wed, 20 May 2015 09:18:03 +0000 (19:18 +1000)
committerHuon Wilson <dbau.pp+github@gmail.com>
Thu, 25 Jun 2015 00:00:43 +0000 (17:00 -0700)
commit225b116829ef76b72f01c2ebf718259c20aa7e14
treede81c44d7ef654e4e44eaa318308f873ff96d9d9
parent2ad26e850ed5dfedda8c96d7315aee50145ceedd
Make `align_of` behave like `min_align_of`.

This removes a footgun, since it is a reasonable assumption to make that
pointers to `T` will be aligned to `align_of::<T>()`. This also matches
the behaviour of C/C++. `min_align_of` is now deprecated.

Closes #21611.
src/liballoc/arc.rs
src/liballoc/rc.rs
src/libarena/lib.rs
src/libcollections/btree/node.rs
src/libcollections/vec.rs
src/libcollections/vec_deque.rs
src/libcore/mem.rs
src/libstd/collections/hash/table.rs