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

Add newlines after standalone attributes #1478

Closed
whitequark opened this issue Apr 29, 2017 · 3 comments
Closed

Add newlines after standalone attributes #1478

whitequark opened this issue Apr 29, 2017 · 3 comments

Comments

@whitequark
Copy link
Member

The quote crate currently outputs the following rather pathological header, which rustfmt leaves nearly verbatim:

# ! [ doc = "Peripheral access API for TM4C1294NCPDT microcontrollers (generated using svd2rust v0.7.0)" ] # ! [ deny ( missing_docs ) ] # ! [ deny ( warnings ) ] # ! [ feature ( const_fn ) ] # ! [ no_std ]extern crate cortex_m ;

The whitespace inside attributes is handled by #984 (but this could provide another testcase), whereas the newline after the attribute doesn't seem to be mentioned anywhere.

@nrc
Copy link
Member

nrc commented May 1, 2017

I think we do insert newlines in some cases, Rustfmt is probably tripping up somewhere gives up formatting, thus not inserting the newlines.

@valpackett
Copy link

I'd actually like to have an option to not insert newlines into e.g.

#[cfg(feature = "filesystem")] use fuse::*;

@topecongiro
Copy link
Contributor

Closing as this is fixed on the current master.

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

4 participants