Skip to content

rustfmt removes a block comment in an argument position #2976

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

Closed
ozkriff opened this issue Aug 28, 2018 · 0 comments
Closed

rustfmt removes a block comment in an argument position #2976

ozkriff opened this issue Aug 28, 2018 · 0 comments
Labels
a-comments bug Panic, non-idempotency, invalid code, etc.

Comments

@ozkriff
Copy link

ozkriff commented Aug 28, 2018

Input:

fn a(_ /*comment*/: u8) {}
fn b(/*comment*/ _: u8) {}

fn main() {}

Expected output (no changes):

fn a(_ /*comment*/: u8) {}
fn b(/*comment*/ _: u8) {}

fn main() {}

Real output (on of the comments is removed):

fn a(_: u8) {}
fn b(/*comment*/ _: u8) {}

fn main() {}

Replacing _ with normal identifier doesn't help.

I guess it's related to #1096.

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.
Projects
None yet
Development

No branches or pull requests

2 participants