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

spooky extra space added when accessing fields in nested tuple structs #4622

Closed
BoxyUwU opened this issue Jan 3, 2021 · 1 comment
Closed

Comments

@BoxyUwU
Copy link
Member

BoxyUwU commented Jan 3, 2021

Input

struct Bar(());
struct Foo(Bar);

fn main() {
    let foo = Foo(Bar(()));

    foo.0.0;
}

Output

struct Bar(());
struct Foo(Bar);

fn main() {
    let foo = Foo(Bar(()));

    foo.0 .0;
}

Expected output

struct Bar(());
struct Foo(Bar);

fn main() {
    let foo = Foo(Bar(()));

    foo.0.0;
}

Meta

  • rustfmt version: 1.4.30-nightly (acd9486 2020-12-0)
  • From where did you install rustfmt?: rustup (happens on playground too)
@calebcartwright
Copy link
Member

Duplicate of various issues (e.g. #4543), explained in #4355 (comment)

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

3 participants