Function syntax::attr::find_repr_attr[src]

pub fn find_repr_attr(diagnostic: &SpanHandler, attr: &Attribute, acc: ReprAttr) -> ReprAttr

Fold this over attributes to parse #[repr(...)] forms.

Valid repr contents: any of the primitive integral type names (see int_type_of_word, below) to specify the discriminant type; and C, to use the same discriminant size that the corresponding C enum would. These are not allowed on univariant or zero-variant enums, which have no discriminant.

If a discriminant type is so specified, then the discriminant will be present (before fields, if any) with that type; reprensentation optimizations which would remove it will not be done.