W3cubDocs

/Rust

Error code E0693

align representation hint was incorrectly declared.

Erroneous code examples:

#![allow(unused)]
fn main() {
#[repr(align=8)] // error!
struct Align8(i8);

#[repr(align="8")] // error!
struct Align8(i8);
}

This is a syntax error at the level of attribute declarations. The proper syntax for align representation hint is the following:

#![allow(unused)]
fn main() {
#[repr(align(8))] // ok!
struct Align8(i8);
}

© 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/E0693.html