Skip to content

Commit d429206

Browse files
committed
---
yaml --- r: 133711 b: refs/heads/try c: 5efa232 h: refs/heads/master i: 133709: ee3913d 133707: a4a6fb9 133703: 3598e82 133695: c0276cf v: v3
1 parent 37fd4ec commit d429206

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0e784e16840e8a0c623cc6166de26da9334db3d6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 828e075abd8ee2f8c16f6cb1b93c0d99307e704d
5-
refs/heads/try: 23f2c78d21440a8699cfa917b422795b5ec4adc7
5+
refs/heads/try: 5efa232160ff07de55cc0f62bfafdedb683789db
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libcollections/vec.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,8 @@ pub mod raw {
17561756
// of type `T`.
17571757
//
17581758
// (g) The size of `T` and `U` is equal and non-zero.
1759+
//
1760+
// (h) The `min_align_of` of `T` and `U` is equal.
17591761

17601762
pub struct PartialVec<T,U> {
17611763
vec: Vec<T>,
@@ -1773,12 +1775,14 @@ impl<T,U> PartialVec<T,U> {
17731775
///
17741776
/// Fails if `T` and `U` have differing sizes or are zero-sized.
17751777
pub fn from_vec(mut vec: Vec<T>) -> PartialVec<T,U> {
1776-
// FIXME: Assert that the types `T` and `U` have the same size.
1778+
// FIXME: Assert statically that the types `T` and `U` have the same
1779+
// size.
17771780
//
1778-
// These asserts make sure (g) is satisfied.
1781+
// These asserts make sure (g) and (h) are satisfied.
17791782
assert!(mem::size_of::<T>() != 0);
17801783
assert!(mem::size_of::<U>() != 0);
17811784
assert!(mem::size_of::<T>() == mem::size_of::<U>());
1785+
assert!(mem::min_align_of::<T>() == mem::min_align_of::<U>());
17821786

17831787
let start = vec.as_mut_ptr();
17841788

0 commit comments

Comments
 (0)