-
Notifications
You must be signed in to change notification settings - Fork 888
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
[unstable option] inline_attribute_width #3343
Labels
unstable option
tracking issue of an unstable option
Comments
I also want this feature a bit, so I send the PR. |
scampi
added
unstable option
tracking issue of an unstable option
and removed
feature-request
labels
Feb 23, 2019
scampi
changed the title
Allow inline attributes
[unstable option] inline_attribute_width
Mar 20, 2019
It appears like this does not work within i.e.: extern "C" {
#[no_mangle]
fn sprintf(_: *mut c_char, _: *const c_char, ...) -> c_int;
} should be formatted to this: extern "C" {
#[no_mangle] fn sprintf(_: *mut c_char, _: *const c_char, ...) -> c_int;
} but isn't versions:
rustfmt.toml edition = "2018"
version = "Two"
inline_attribute_width = 100
unstable_features = true |
This also doesn't work within #5538. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As you can see from this diff, inline-attributes are viable and sometimes even useful (specifically: making diffs align properly, which has been an issue in Rand's
lib.rs
quite a few times).rustfmt
is forcing multi-line attributes everywhere. I would like an option for inline attributes (when small).The text was updated successfully, but these errors were encountered: