Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle empty struct defs properly #919

Closed
nrc opened this issue Apr 11, 2016 · 2 comments · Fixed by #1453
Closed

Handle empty struct defs properly #919

nrc opened this issue Apr 11, 2016 · 2 comments · Fixed by #1453
Labels
bug Panic, non-idempotency, invalid code, etc. poor-formatting

Comments

@nrc
Copy link
Member

nrc commented Apr 11, 2016

We either don't reformat (struct structs) or lose comments (tuple structs). We should do neither.

e.g.,

struct Foo( /* a comment */ );
struct Foo();
struct Foo{ /* a comment */ }
struct Foo{}

should be idempotent

@nrc nrc added bug Panic, non-idempotency, invalid code, etc. poor-formatting labels Apr 11, 2016
@tobarja
Copy link

tobarja commented May 16, 2016

Are you trying to say that those should remain untouched, but that the examples below are also idempotent, or that the code below should be reformatted to that above?

struct Foo ( /* a comment */ );
struct Foo ();
struct Foo { /* a comment */ }
struct Foo {}

@nrc
Copy link
Member Author

nrc commented May 16, 2016

I'm saying that the above should remain the same and the below should be changed to the above.

Although I actually made a mistake, there should be spaces before the opening braces:

struct Foo( /* a comment */ );
struct Foo();
struct Foo { /* a comment */ }
struct Foo {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc. poor-formatting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants