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

Use 0: for named-fields debug of tuples and tuple variants #32

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ijackson
Copy link
Contributor

@ijackson ijackson commented Aug 1, 2024

Change the output when the user requests debug printing of a tuple struct in named fields syntax.

Previously we output _0: (for example), which isn't really right: Rust permits 0: , and the field is actually called 0.

This is a behavioural change, but I don't think Debug output is regarded as semver-relevant, so this shouldn't be a considered breaking change.

field_name is the real field name and doesn't depend on the attribute.
Separating this makes things less confusing.
Change the output when the user requests debug printing of a tuple
struct in named fields syntax.

Previously we output `_0: ` (for example), which isn't really right:
Rust permits `0: `, and the field is actually called `0`.

This is a behavioural change, but I don't think Debug output is
regarded as semver-relevant, so this shouldn't be a breaking change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant