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

Misaligned comments when mixing unicode and ascii #5564

Closed
tfeldmann opened this issue Oct 19, 2022 · 1 comment
Closed

Misaligned comments when mixing unicode and ascii #5564

tfeldmann opened this issue Oct 19, 2022 · 1 comment

Comments

@tfeldmann
Copy link

tfeldmann commented Oct 19, 2022

I've got this strange formatting:

const STRAIGHT_WIDE: [&str; 16] = [
    "  ",     //
    "╵ ",   //  U
    "╶─", //    R
    "└─", //  U R
    "╷ ",   //      D
    "│ ",   //  U   D
    "┌─", //    R D
    "├─", //  U R D
    "╴ ",   //        L
    "┘ ",   //  U     L
    "──", //    R
    "┴─", //  U R   L
    "┐ ",   //      D L
    "┤ ",   //  U   D L
    "┬─", //    R D L
    "┼─", //  U R D L
];

Expected output:

const STRAIGHT_WIDE: [&str; 16] = [
    "  ", //
    "╵ ", //  U
    "╶─", //    R
    "└─", //  U R
    "╷ ", //      D
    "│ ", //  U   D
    "┌─", //    R D
    "├─", //  U R D
    "╴ ", //        L
    "┘ ", //  U     L
    "──", //    R
    "┴─", //  U R   L
    "┐ ", //      D L
    "┤ ", //  U   D L
    "┬─", //    R D L
    "┼─", //  U R D L
];
❯ rustfmt -V
rustfmt 1.5.1-stable (a55dd71d 2022-09-19)
@ytmimi
Copy link
Contributor

ytmimi commented Oct 19, 2022

Thanks for reaching out!

This is a duplicate of #5504, and the issue has been resolved on master, but hasn't been released yet.

@ytmimi ytmimi closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2022
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