D7796: rust-nodemap: input/output primitives

kevincox (Kevin Cox) phabricator at mercurial-scm.org
Thu Jan 16 10:34:25 EST 2020


kevincox added a comment.


  Ah yes. So my test would be ineffective.
  
  The problem that IIUC padding is not guaranteed to be initialized, and in rust all values need to be initialized. So if you cast a type with padding to a `u8` it is undefined behaviour.
  
  So we would need a test that shows that the type is the same size as the sum of the contained `i32`s.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7796/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7796

To: gracinet, #hg-reviewers, kevincox
Cc: durin42, kevincox, mercurial-devel


More information about the Mercurial-devel mailing list