diff --git a/crates/ra_ide/src/folding_ranges.rs b/crates/ra_ide/src/folding_ranges.rs index 5cec689f8b..e7ec9953fd 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 { ARG_LIST => Some(FoldKind::ArgList), RECORD_FIELD_DEF_LIST | RECORD_FIELD_PAT_LIST + | RECORD_FIELD_LIST | ITEM_LIST | EXTERN_ITEM_LIST | USE_TREE_LIST @@ -355,7 +356,8 @@ fn main() { 0 => 0, _ => 1, } -}"#, +} +"#, ); } @@ -370,7 +372,18 @@ fn main() { 3, ) } - "#, +"#, + ) + } + + #[test] + fn fold_record_literals() { + check( + r#" +const _: S = S { + +}; +"#, ) } }