5547: Fold multiline fn parameters r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-07-27 11:48:10 +00:00 committed by GitHub
commit 020a40335b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ fn fold_kind(kind: SyntaxKind) -> Option<FoldKind> {
match kind {
COMMENT => Some(FoldKind::Comment),
USE_ITEM => Some(FoldKind::Imports),
ARG_LIST => Some(FoldKind::ArgList),
ARG_LIST | PARAM_LIST => Some(FoldKind::ArgList),
RECORD_FIELD_DEF_LIST
| RECORD_FIELD_PAT_LIST
| RECORD_FIELD_LIST
@ -383,6 +383,18 @@ fn fold_record_literals() {
const _: S = S <fold block>{
}</fold>;
"#,
)
}
#[test]
fn fold_multiline_params() {
check(
r#"
fn foo<fold arglist>(
x: i32,
y: String,
)</fold> {}
"#,
)
}