d)`. If it were, the compiler would emit E0793. We do not support + // packed structs, since `Init::__init` requires an aligned pointer; the same + // requirement that the call to `ptr::write` below has. + // For more info see let accessor = if pinned { let project_ident = format_ident!("__project_{ident}"); quote! { @@ -278,6 +283,11 @@ fn init_fields( InitializerKind::Init { ident, value, .. } => { // Again span for better diagnostics let init = format_ident!("init", span = value.span()); + // NOTE: the field accessor ensures that the initialized struct is not + // `repr(packed)`. If it were, the compiler would emit E0793. We do not support + // packed structs, since `Init::__init` requires an aligned pointer; the same + // requirement that the call to `ptr::write` below has. + // For more info see let (value_init, accessor) = if pinned { let project_ident = format_ident!("__project_{ident}"); ( -- 2.53.0[PATCH 2/2] rust: pin-init: internal: init: document load-bearing fact of field accessorsBenno Lossin undefinedBenno Lossin , Gary Guo , Miguel Ojeda , Boqun Feng , Björn Roy Baron , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Wedson Almeida Filho undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined‚J†¤;