pub struct DeclSpecs {
pub storage: Option<StorageClass>,
pub thread_local: bool,
pub constexpr: bool,
pub ty: TypeSpec,
pub quals: Quals,
pub func: FuncSpecs,
pub align: Option<AlignSpec>,
pub attrs: AttrList,
pub span: Span,
}Expand description
Everything a declaration says before its first declarator.
Fields§
§storage: Option<StorageClass>The storage class, of which there may be at most one.
thread_local: boolWhether _Thread_local was written, which is separate because it is a storage class
specifier that may be combined with another.
constexpr: boolWhether constexpr was written, which is separate for the same reason: C23 6.7.1 lets
it stand beside auto, register or static, and static constexpr int x = 1; is a
declaration people write.
ty: TypeSpecWhat type was named.
quals: QualsThe qualifiers, which may be written before or after the type.
func: FuncSpecsinline and _Noreturn.
align: Option<AlignSpec>alignas, of which there may be several, of which the strictest wins. Only the first is
kept here; the rest are in the side table alongside it.
attrs: AttrListAttributes that appertain to the declaration as a whole.
span: SpanFrom the first specifier to the last.