W3cubDocs

/Rust

Error code E0634

A type has conflicting packed representation hints.

Erroneous code examples:

#![allow(unused)]
fn main() {
#[repr(packed, packed(2))] // error!
struct Company(i32);

#[repr(packed(2))] // error!
#[repr(packed)]
struct Company(i32);
}

You cannot use conflicting packed hints on a same type. If you want to pack a type to a given size, you should provide a size to packed:

#![allow(unused)]
fn main() {
#[repr(packed)] // ok!
struct Company(i32);
}

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0634.html