Skip to content

Formatting a line comment inbetween a function parameter and its type results in the type being commented out #6520

Open
@5225225

Description

@5225225

Formatting

fn foo(x: //comment here
u32) {} 

results in (on playground 1.8.0-nightly (2025-03-22 b48576b4db))

pub fn foo(x: //comment here u32
) {
}

I agree this is a remarkably weird place to put a comment, but it should at least not result in breaking compilation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-commentsbugPanic, non-idempotency, invalid code, etc.p-low

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions