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
{{ message }}
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
Bad indent for anonymous field types with trailing comma #42
// if there is no trailing comma, it indents properlypubconstSt=struct {
anon_field: enum {
some_field
}
};
// if there is any character other than a comma after the line, it also indents properlypubconstSt=struct {
anon_field: enum {
}, // this comment prevents the indent problem
};
pubconstSt=struct {
anon_field: enum {
},
// (there's a trailing whitespace on the line above)
};
// empty lines do not solve the problempubconstSt=struct {
anon_field: enum {
},
};
// identifiers that are on the same line as the opening bracket do not solve the issue either.pubconstSt=struct {
anon_field: enum { foo, bar
},
};
pubconstSt=struct {
anon_field: enum { foo, bar,
a// it solved with this one here, though
},
};
// it also happens with `struct` and any other type. The problem seems to be on the brackets themselves.pubconstSt=struct {
anon_field: struct {
},
};
pubconstSt=struct {
anon_field: union(enum) {
},
};
pubconstSt=struct {
anon_field: {
},
};
Activity
fervagar commentedon Jan 31, 2025
No solution so far?
yohannd1 commentedon Feb 1, 2025
No, sorry. I had forgotten about this to be honest.
fervagar commentedon Feb 16, 2025
@yohannd1 don't be sorry! I just wanted to check on its status.
If I can help, I'd be happy to. Could you provide some pointers on where to start?
yohannd1 commentedon Feb 17, 2025
Back then I started a PR to try and fix it. If I recall correctly the changes I made didn't help much, though.
remove indent workarounds that try to fix non existent issues