From 594252fdc4a3ec5a3db94df5a2f4697a63e61283 Mon Sep 17 00:00:00 2001 From: Young-Flash Date: Mon, 30 Jun 2025 17:27:07 +0800 Subject: [PATCH] test: add test case for func with multiline param list --- .../crates/ide/src/folding_ranges.rs | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/tools/rust-analyzer/crates/ide/src/folding_ranges.rs b/src/tools/rust-analyzer/crates/ide/src/folding_ranges.rs index 7ac160dac2e1..c081796d078c 100755 --- a/src/tools/rust-analyzer/crates/ide/src/folding_ranges.rs +++ b/src/tools/rust-analyzer/crates/ide/src/folding_ranges.rs @@ -360,6 +360,23 @@ mod tests { } } + #[test] + fn test_fold_func_with_multiline_param_list() { + check( + r#" +fn func( + a: i32, + b: i32, + c: i32, +) { + + + +} +"#, + ); + } + #[test] fn test_fold_comments() { check( @@ -572,10 +589,10 @@ const _: S = S { fn fold_multiline_params() { check( r#" -fn foo( +fn foo( x: i32, y: String, -) {} +) {} "#, ) }