diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-25 19:49:54 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-25 19:49:54 +0000 |
commit | e53eab3f25af2ebd381012f1b34f0bc52c6951eb (patch) | |
tree | fdb97e99f511d05aae145fe13ef3152883c24892 /crates/ra_syntax | |
parent | 55906341a6f61e12df1dc0a4bda35dd9814ece8b (diff) | |
parent | 7a0bc2dd6402d681223be4198ec68ee7bb65d9ee (diff) |
Merge #650
650: Add docs to struct fields r=matklad a=kjeremy
Co-authored-by: Jeremy A. Kolb <[email protected]>
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar.ron | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/parser_impl/event.rs | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 7da19d782..e936c2a6d 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -2248,6 +2248,7 @@ impl ToOwned for NamedFieldDef { | |||
2248 | impl ast::VisibilityOwner for NamedFieldDef {} | 2248 | impl ast::VisibilityOwner for NamedFieldDef {} |
2249 | impl ast::NameOwner for NamedFieldDef {} | 2249 | impl ast::NameOwner for NamedFieldDef {} |
2250 | impl ast::AttrsOwner for NamedFieldDef {} | 2250 | impl ast::AttrsOwner for NamedFieldDef {} |
2251 | impl ast::DocCommentsOwner for NamedFieldDef {} | ||
2251 | impl NamedFieldDef { | 2252 | impl NamedFieldDef { |
2252 | pub fn type_ref(&self) -> Option<&TypeRef> { | 2253 | pub fn type_ref(&self) -> Option<&TypeRef> { |
2253 | super::child_opt(self) | 2254 | super::child_opt(self) |
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index cb5d6cde8..a92d9bbda 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron | |||
@@ -268,7 +268,7 @@ Grammar( | |||
268 | ] | 268 | ] |
269 | ), | 269 | ), |
270 | "NamedFieldDefList": (collections: [["fields", "NamedFieldDef"]]), | 270 | "NamedFieldDefList": (collections: [["fields", "NamedFieldDef"]]), |
271 | "NamedFieldDef": ( traits: ["VisibilityOwner", "NameOwner", "AttrsOwner"], options: ["TypeRef"] ), | 271 | "NamedFieldDef": ( traits: ["VisibilityOwner", "NameOwner", "AttrsOwner", "DocCommentsOwner"], options: ["TypeRef"] ), |
272 | "PosFieldList": (collections: [["fields", "PosField"]]), | 272 | "PosFieldList": (collections: [["fields", "PosField"]]), |
273 | "PosField": ( traits: ["VisibilityOwner", "AttrsOwner"], options: ["TypeRef"]), | 273 | "PosField": ( traits: ["VisibilityOwner", "AttrsOwner"], options: ["TypeRef"]), |
274 | "EnumDef": ( traits: [ | 274 | "EnumDef": ( traits: [ |
diff --git a/crates/ra_syntax/src/parser_impl/event.rs b/crates/ra_syntax/src/parser_impl/event.rs index bd77fee89..33e10ef85 100644 --- a/crates/ra_syntax/src/parser_impl/event.rs +++ b/crates/ra_syntax/src/parser_impl/event.rs | |||
@@ -250,7 +250,7 @@ fn n_attached_trivias<'a>( | |||
250 | ) -> usize { | 250 | ) -> usize { |
251 | match kind { | 251 | match kind { |
252 | CONST_DEF | TYPE_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN_DEF | TRAIT_DEF | 252 | CONST_DEF | TYPE_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN_DEF | TRAIT_DEF |
253 | | MODULE => { | 253 | | MODULE | NAMED_FIELD_DEF => { |
254 | let mut res = 0; | 254 | let mut res = 0; |
255 | for (i, (kind, text)) in trivias.enumerate() { | 255 | for (i, (kind, text)) in trivias.enumerate() { |
256 | match kind { | 256 | match kind { |