xls
xls copied to clipboard
[dslx:fmt] Support multi-line inline comments (e.g. struct member comments) remaining unchanged during autofmt
In a test case like:
pub struct Point {
x: u32, // this is a longer comment
// it wants to be multi-line for some reason
y: u32,
}
The autoformatter will unhelpfully dedent your second line because it thinks it's a weirdly indented comment on the y
member. We can fix this by coalescing the two pieces into one comment entity in our comment-location-query data structure.