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

Syntax error after formatting a derive attribute that contains a block comment #4984

Closed
SamRodri opened this issue Sep 8, 2021 · 0 comments · Fixed by #5002
Closed

Syntax error after formatting a derive attribute that contains a block comment #4984

SamRodri opened this issue Sep 8, 2021 · 0 comments · Fixed by #5002
Labels
a-comments bug Panic, non-idempotency, invalid code, etc.

Comments

@SamRodri
Copy link

SamRodri commented Sep 8, 2021

Formatting this code:

#[derive(/*Debug, */Clone)]
struct Foo;

generates this syntax error:

#[derive(#[derive(/*Debug, */ Clone)]
struct Foo;

I tested rustfmt 1.4.37 stable and nightly.

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

Successfully merging a pull request may close this issue.

2 participants