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
Describe the bug
These might all be different root causes, but I encountered each of these when trying to comment on a tuple element, but the autoformatter keeps changing my intent.
Below, comment 1 is moved to the previous element, comment 2 is removed, and comment 3 is triplicated in the branch arms.
To Reproduce
fn foo(bar: u32) {
let some_data_to_make_single_update_per_line = u32:0xabcdef;
(
bit_slice_update(some_data_to_make_single_update_per_line, 0, u1:1),
// This is an important comment
bit_slice_update(
some_data_to_make_single_update_per_line, 1,
// This is another important comment
if bar > u32:0xdeadbeef { u1:1 } else { u1:0 }), // this is yet another comment
bit_slice_update(some_data_to_make_single_update_per_line, 2, u1:1)
)
}
Changes to:
fn foo(bar: u32) {
let some_data_to_make_single_update_per_line = u32:0xabcdef;
(
bit_slice_update(some_data_to_make_single_update_per_line, 0, u1:1), // This is an important
// comment
bit_slice_update(
some_data_to_make_single_update_per_line, 1,
if bar > u32:0xdeadbeef {
u1:1 // this is yet another comment
} else {
u1:0 // this is yet another comment
}), // this is yet another comment
bit_slice_update(some_data_to_make_single_update_per_line, 2, u1:1)
)
}
Expected behavior
Preserve my comments as is, which best reflects the developer intent for readability.
The text was updated successfully, but these errors were encountered:
Describe the bug
These might all be different root causes, but I encountered each of these when trying to comment on a tuple element, but the autoformatter keeps changing my intent.
Below, comment 1 is moved to the previous element, comment 2 is removed, and comment 3 is triplicated in the branch arms.
To Reproduce
Changes to:
Expected behavior
Preserve my comments as is, which best reflects the developer intent for readability.
The text was updated successfully, but these errors were encountered: