You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that rustfmt stops working if the comment just after the => of a "match" contains "=>".
info :
rustfmt 1.7.0-stable (82e1608 2023-12-21)
rustc 1.75.0 (82e1608df 2023-12-21)
here's an example code :
fnmain(){let a = 50u32;match a {10 =>
// comment => 10{println!("A")}20 => {println!("B")}
_ => {println!("C")}}}
the problem is in the comment : // comment => 10
the comment contains the symbol "=>", if you try to use rustfmt it won't work.
but if you delete the "=>" from the comment, or simply add a space like this "= >", rustmt works again.
you can test the bug here : ( click on the top-right "Tools -> Rustfmt" button to start formatting, but it won't work as long as the comment contains "=>" ) Playground
Thank you for the wonderful work that you do 👍
The text was updated successfully, but these errors were encountered:
rxdiscovery
changed the title
rustfmt stops working if the comment just after the => of a "match" contains "=>".
rustfmt stops working if the comment just after the => of a "match" contains "=>"
Dec 29, 2023
Hello,
I've noticed that rustfmt stops working if the comment just after the => of a "match" contains "=>".
info :
rustfmt 1.7.0-stable (82e1608 2023-12-21)
rustc 1.75.0 (82e1608df 2023-12-21)
here's an example code :
the problem is in the comment :
// comment => 10
the comment contains the symbol "=>", if you try to use rustfmt it won't work.
but if you delete the "=>" from the comment, or simply add a space like this "= >", rustmt works again.
you can test the bug here : ( click on the top-right "Tools -> Rustfmt" button to start formatting, but it won't work as long as the comment contains "=>" )
Playground
Thank you for the wonderful work that you do 👍
The text was updated successfully, but these errors were encountered: