Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
5225225 opened this issue Mar 23, 2025 · 0 comments
Labels
a-comments bug Panic, non-idempotency, invalid code, etc. p-low

Comments

@5225225
Copy link

5225225 commented Mar 23, 2025

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.

@ytmimi ytmimi added bug Panic, non-idempotency, invalid code, etc. a-comments p-low labels Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-comments bug Panic, non-idempotency, invalid code, etc. p-low
Projects
None yet
Development

No branches or pull requests

2 participants