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

/* comments */ are sometimes formatted away in function declarations #5100

Open
wooster0 opened this issue Nov 20, 2021 · 1 comment
Open

Comments

@wooster0
Copy link
Contributor

fn x<T: Clone>/* pls don't format me away */(x: T) {}
fn x/* pls don't format me away */<T: Clone>(x: T) {}
fn /* pls don't format me away */x<T: Clone>(x: T) {}

All of these examples are formatted to

fn x<T: Clone>(x: T) {}

but I expect the comment to stay.

@ytmimi ytmimi changed the title /* comments */ are sometimes formatted away /* comments */ are sometimes formatted away in function declarations Jul 27, 2022
@ytmimi
Copy link
Contributor

ytmimi commented Jul 27, 2022

Another example of where rustfmt isn't looking for comments #4905

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants