ソースを参照

multiboot2: remove unused align(8) structs

I decided so as they only make things more complicated for miri. As we have
mature builder and parser structs guaranteeing alignment, we do not have to
create additional confusion. These align(8) markers do not have value-add
here besides being informational.

They are only useful if no crazy pointer magic is involved and Rust constructs
these types "in the Rust-typical way".
Philipp Schuster 1 年間 前
コミット
19adde195c
1 ファイル変更2 行追加2 行削除
  1. 2 2
      multiboot2/src/lib.rs

+ 2 - 2
multiboot2/src/lib.rs

@@ -145,7 +145,7 @@ impl core::error::Error for MbiLoadError {}
 
 /// The basic header of a boot information.
 #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
-#[repr(C, align(8))]
+#[repr(C)]
 pub struct BootInformationHeader {
     // size is multiple of 8
     total_size: u32,
@@ -1638,7 +1638,7 @@ mod tests {
     fn get_custom_dst_tag_from_mbi() {
         const CUSTOM_TAG_ID: u32 = 0x1337;
 
-        #[repr(C, align(8))]
+        #[repr(C)]
         #[derive(crate::Pointee)]
         struct CustomTag {
             tag: TagTypeId,