Skip to content

Since v0.3.2539 (2025-07-14), folding a comment is folding the whole function/method #20240

Open
@rodrigocfd

Description

@rodrigocfd

rust-analyzer version: rust-analyzer version: 0.3.2539-standalone (591e3b7 2025-07-13)

rustc version: rustc 1.88.0 (6b00bc388 2025-06-23)

editor or extension: VSCode v1.102.0

code snippet to reproduce:

/// A very very very very very very very very very very very very very very very
/// very very very long description
fn foo(
	very_long_parameter_name: u32,
	another_very_long_parameter_name: u32,
	third_very_long_parm: u32,
) {
	todo!()
}

expected behavior: when collapsing the comment block, only the comment block should be collapsed. Since v0.3.2539, collapsing the comments is also collapsing the function arguments and the function body:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions