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

Rustfmt edition 2018 is adding a space where where it shouldn't #5123

Closed
oxarbitrage opened this issue Dec 3, 2021 · 2 comments
Closed

Rustfmt edition 2018 is adding a space where where it shouldn't #5123

oxarbitrage opened this issue Dec 3, 2021 · 2 comments

Comments

@oxarbitrage
Copy link

oxarbitrage commented Dec 3, 2021

I am not totally sure if this is a bug or if there is any reason for it but i have some rust code as follows:

let var = funct().0.0;

When i run rustfmt it is adding an extra space to that line so it becomes:

let var = funct().0 .0;

For reference, in this example, funct is something as:

fn funct() -> (type1, type2)

and type1 is something as:

struct type1(u32);
@calebcartwright
Copy link
Member

calebcartwright commented Dec 3, 2021

Thanks for reaching out but going to close as a duplicate. The behavior is explained, along with some available options, in the issues linked below.

#4355 (comment), #4779

(edit, fix typo)

@oxarbitrage
Copy link
Author

Thanks, sorry i didn't checked the amount of already closed issues for the same problem before opening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants