Closed
Description
rustfmt
incorrectly formats the following code:
pub struct Arr
where [u8; {10 / 2}]: Send
{}
as
pub struct Arr
where
[u8; { 10 / 2 }]: Send, {
10 / 2}]: Send
{}
Both the braces and the division are required.
This bug does not happen for where bounds on traits.
pub trait Arr
where [u8; {10 / 2}]: Send
{}
// This is formatted correctly
Found while looking at rust-lang/rust#72819
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]division in where build leads to incorrect formatting[/-][+]division in where clause leads to incorrect formatting[/+]Handle const generic bounds in structs
Handle const generic bounds in structs