https://docs.rs/syn/latest/syn/struct.DataStruct.html:
pub struct DataStruct {
pub struct_token: Struct,
pub fields: Fields,
pub semi_token: Option<Semi>,
}
为什么缺少已定义结构(pub ident: Ident,
)的标识符?
解析struct X { ... }
,如何找到X
?
https://docs.rs/syn/latest/syn/struct.DataStruct.html:
pub struct DataStruct {
pub struct_token: Struct,
pub fields: Fields,
pub semi_token: Option<Semi>,
}
为什么缺少已定义结构(pub ident: Ident,
)的标识符?
解析struct X { ... }
,如何找到X
?
1条答案
按热度按时间lsmepo6l1#
它在
DeriveInput
中,因为它被结构体、枚举和联合体共享: