aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_ide/src/folding_ranges.rs17
1 files changed, 15 insertions, 2 deletions
diff --git a/crates/ra_ide/src/folding_ranges.rs b/crates/ra_ide/src/folding_ranges.rs
index 5cec689f8..e7ec9953f 100644
--- a/crates/ra_ide/src/folding_ranges.rs
+++ b/crates/ra_ide/src/folding_ranges.rs
@@ -87,6 +87,7 @@ fn fold_kind(kind: SyntaxKind) -> Option<FoldKind> {
87 ARG_LIST => Some(FoldKind::ArgList), 87 ARG_LIST => Some(FoldKind::ArgList),
88 RECORD_FIELD_DEF_LIST 88 RECORD_FIELD_DEF_LIST
89 | RECORD_FIELD_PAT_LIST 89 | RECORD_FIELD_PAT_LIST
90 | RECORD_FIELD_LIST
90 | ITEM_LIST 91 | ITEM_LIST
91 | EXTERN_ITEM_LIST 92 | EXTERN_ITEM_LIST
92 | USE_TREE_LIST 93 | USE_TREE_LIST
@@ -355,7 +356,8 @@ fn main() <fold block>{
355 0 => 0, 356 0 => 0,
356 _ => 1, 357 _ => 1,
357 }</fold> 358 }</fold>
358}</fold>"#, 359}</fold>
360"#,
359 ); 361 );
360 } 362 }
361 363
@@ -370,7 +372,18 @@ fn main() <fold block>{
370 3, 372 3,
371 )</fold> 373 )</fold>
372}</fold> 374}</fold>
373 "#, 375"#,
376 )
377 }
378
379 #[test]
380 fn fold_record_literals() {
381 check(
382 r#"
383const _: S = S <fold block>{
384
385}</fold>;
386"#,
374 ) 387 )
375 } 388 }
376} 389}