Skip to content

Wrapping at just over 100 chars for macro invocation #3638

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

Closed
cramertj opened this issue Jun 19, 2019 · 0 comments · Fixed by #4189
Closed

Wrapping at just over 100 chars for macro invocation #3638

cramertj opened this issue Jun 19, 2019 · 0 comments · Fixed by #4189
Labels
bug Panic, non-idempotency, invalid code, etc. poor-formatting

Comments

@cramertj
Copy link
Member

macro_rules! abait { ($x:expr) => { Ok(()) } }

mod a {
    fn foo() -> Result<(), ()> {
        unsafe {
            (
                abait!(proxy.load_account(ahc_client_end, TEST_ACCOUNT_ID.clone().as_mut().into()))?,
                (),
            )
        };
        Ok(())
    }
}

is the result of rustfmt with the default config, but it should be wrapping the abait! line. If abait! is replaced with a function abaity, rustfmt will wrap the line.

@topecongiro topecongiro added bug Panic, non-idempotency, invalid code, etc. poor-formatting labels Jun 20, 2019
ayazhafiz added a commit to ayazhafiz/rustfmt that referenced this issue May 19, 2020
The cases with `hard_tabs: true` were fixed in 2836f9b.
Not sure about the rest, but this suggests a number of open issues are
already resolved.

Closes rust-lang#3608
Closes rust-lang#3550
Closes rust-lang#3638
Closes rust-lang#3858
Closes rust-lang#3936
ayazhafiz added a commit to ayazhafiz/rustfmt that referenced this issue May 20, 2020
The cases with `hard_tabs: true` were fixed in 2836f9b.
Not sure about the rest, but this suggests a number of open issues are
already resolved.

Closes rust-lang#3608
Closes rust-lang#3550
Closes rust-lang#3638
Closes rust-lang#3858
Closes rust-lang#3936
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