Skip to content

rustfmt is not indenting attributes #1915

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
fitzgen opened this issue Aug 24, 2017 · 0 comments
Closed

rustfmt is not indenting attributes #1915

fitzgen opened this issue Aug 24, 2017 · 0 comments

Comments

@fitzgen
Copy link
Member

fitzgen commented Aug 24, 2017

input.rs:

extern "C" {
#[link_name = "_ZN7MyClass26example_check_no_collisionE"]
    pub static mut  MyClass_example_check_no_collision  :  * const :: std :: os :: raw :: c_int ;
}

Run rustfmt on it:

$ rustup run nightly rustfmt --version
0.2.2-nightly ( )
$ rustup run nightly rustfmt < input.rs 
extern "C" {
#[link_name = "_ZN7MyClass26example_check_no_collisionE"]
    pub static mut MyClass_example_check_no_collision: *const ::std::os::raw::c_int;
}

Note that the link name attribute is not indented properly.

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