aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/parser_impl
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-24 01:22:29 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-24 01:22:29 +0000
commit6a0a4a564accb12b48e703245655e3e3a0637445 (patch)
tree248097d8ceaded63601e3d663ef795e3bae55bfe /crates/ra_syntax/src/parser_impl
parentbf9cd6ee30b3044b61e99e24e82fad56d3965417 (diff)
parentf87ce73579759fdb623f1d8d82880c0d6306746e (diff)
Merge #621
621: Completion docs for code model r=kjeremy a=kjeremy Adds a way to access documentation through the code model and exposes it to completions. Also allows us to document enum variants. Co-authored-by: Jeremy A. Kolb <[email protected]> Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/parser_impl')
-rw-r--r--crates/ra_syntax/src/parser_impl/event.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/parser_impl/event.rs b/crates/ra_syntax/src/parser_impl/event.rs
index 73dd6e02b..bd77fee89 100644
--- a/crates/ra_syntax/src/parser_impl/event.rs
+++ b/crates/ra_syntax/src/parser_impl/event.rs
@@ -249,7 +249,8 @@ fn n_attached_trivias<'a>(
249 trivias: impl Iterator<Item = (SyntaxKind, &'a str)>, 249 trivias: impl Iterator<Item = (SyntaxKind, &'a str)>,
250) -> usize { 250) -> usize {
251 match kind { 251 match kind {
252 CONST_DEF | TYPE_DEF | STRUCT_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | MODULE => { 252 CONST_DEF | TYPE_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN_DEF | TRAIT_DEF
253 | MODULE => {
253 let mut res = 0; 254 let mut res = 0;
254 for (i, (kind, text)) in trivias.enumerate() { 255 for (i, (kind, text)) in trivias.enumerate() {
255 match kind { 256 match kind {