aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorcsmoe <[email protected]>2019-01-04 04:22:57 +0000
committercsmoe <[email protected]>2019-01-04 04:22:57 +0000
commit58139c558aa085588264ba659b8483a036c1da0e (patch)
tree57284d9546ffeb7825fac0562fe43f008ed16d07 /crates
parentdf591a1e48a876653f1f48ed595d1754470d116f (diff)
consume trivias for type/const def
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_syntax/src/parser_impl/event.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/parser_impl/event.rs b/crates/ra_syntax/src/parser_impl/event.rs
index 835b2c78d..73dd6e02b 100644
--- a/crates/ra_syntax/src/parser_impl/event.rs
+++ b/crates/ra_syntax/src/parser_impl/event.rs
@@ -248,9 +248,8 @@ fn n_attached_trivias<'a>(
248 kind: SyntaxKind, 248 kind: SyntaxKind,
249 trivias: impl Iterator<Item = (SyntaxKind, &'a str)>, 249 trivias: impl Iterator<Item = (SyntaxKind, &'a str)>,
250) -> usize { 250) -> usize {
251 // FIXME: parse attached trivias of CONST_DEF/TYPE_DEF
252 match kind { 251 match kind {
253 STRUCT_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | MODULE => { 252 CONST_DEF | TYPE_DEF | STRUCT_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | MODULE => {
254 let mut res = 0; 253 let mut res = 0;
255 for (i, (kind, text)) in trivias.enumerate() { 254 for (i, (kind, text)) in trivias.enumerate() {
256 match kind { 255 match kind {