Rustfmt wrongly alphabatizes raw identifiers in use
statements
#5362
Labels
1x-backport:pending
Fixed/resolved in source but not yet backported to a 1x branch and release
a-imports
`use` syntax
duplicate
Description
I'm writing a toy compiler, and recently split up the elements of my grammar into their own modules.
Unfortunately, there's overlap between the elements and some Rust keywords, so sometimes I need to use raw identifiers:
I would expect these to be sorted alphabetically, not including the
r#
But, rustfmt seems to include it when sorting, and changes this to:
Note that this doesn't happen with modules:
here rustfmt correctly ignores the
r#
prefix when sorting.I'm open to fixing this, if someone could point me in the right direction! Since it seems *crosses fingers* like an easy fix.
Environment
rustfmt 1.4.38-nightly (e0944922 2022-05-31) on macOS Monterey
The text was updated successfully, but these errors were encountered: