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

rustfmt removes comments inside parentheses in patterns (PatKind::Paren). #6110

Open
yuvraj-wale opened this issue Mar 11, 2024 · 1 comment · May be fixed by #6111
Open

rustfmt removes comments inside parentheses in patterns (PatKind::Paren). #6110

yuvraj-wale opened this issue Mar 11, 2024 · 1 comment · May be fixed by #6111
Assignees

Comments

@yuvraj-wale
Copy link

yuvraj-wale commented Mar 11, 2024

  • Issue: rustfmt unexpectedly removes comments inside parentheses in patterns (PatKind::Paren).

  • Example:

    • Input:

      fn main() {
          let (/* */() | ()/* */) = ();
      }
    • Output (after formatting):

      fn main() {
          let (() | ()) = ();
      }
    • Expected Outcome:

      fn main() {
          let (/* */() | ()/* */) = ();
      }
  • Related Issues:

@yuvraj-wale
Copy link
Author

@rustbot claim

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

Successfully merging a pull request may close this issue.

1 participant