Add docs to struct fields
This commit is contained in:
@@ -2248,6 +2248,7 @@ impl ToOwned for NamedFieldDef {
|
||||
impl ast::VisibilityOwner for NamedFieldDef {}
|
||||
impl ast::NameOwner for NamedFieldDef {}
|
||||
impl ast::AttrsOwner for NamedFieldDef {}
|
||||
impl ast::DocCommentsOwner for NamedFieldDef {}
|
||||
impl NamedFieldDef {
|
||||
pub fn type_ref(&self) -> Option<&TypeRef> {
|
||||
super::child_opt(self)
|
||||
|
||||
@@ -268,7 +268,7 @@ Grammar(
|
||||
]
|
||||
),
|
||||
"NamedFieldDefList": (collections: [["fields", "NamedFieldDef"]]),
|
||||
"NamedFieldDef": ( traits: ["VisibilityOwner", "NameOwner", "AttrsOwner"], options: ["TypeRef"] ),
|
||||
"NamedFieldDef": ( traits: ["VisibilityOwner", "NameOwner", "AttrsOwner", "DocCommentsOwner"], options: ["TypeRef"] ),
|
||||
"PosFieldList": (collections: [["fields", "PosField"]]),
|
||||
"PosField": ( traits: ["VisibilityOwner", "AttrsOwner"], options: ["TypeRef"]),
|
||||
"EnumDef": ( traits: [
|
||||
|
||||
@@ -250,7 +250,7 @@ fn n_attached_trivias<'a>(
|
||||
) -> usize {
|
||||
match kind {
|
||||
CONST_DEF | TYPE_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN_DEF | TRAIT_DEF
|
||||
| MODULE => {
|
||||
| MODULE | NAMED_FIELD_DEF => {
|
||||
let mut res = 0;
|
||||
for (i, (kind, text)) in trivias.enumerate() {
|
||||
match kind {
|
||||
|
||||
Reference in New Issue
Block a user