Skip to content

README: Note that rustfmt_skip on non-inline mod quiets line length warnings #1406

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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ options covering different styles. File an issue, or even better, submit a PR.
#[rustfmt_skip] // requires nightly and #![feature(custom_attribute)] in crate root
#[cfg_attr(rustfmt, rustfmt_skip)] // works in stable
```

Note that if one of these attributes is used on a `mod` item that references
a file (e.g., `mod foo;`), the referenced file will be ignored entirely,
whereas, in other skipped sections of code, rustfmt will warn on lines that
exceed the line length limit.
* When you run rustfmt, place a file named `rustfmt.toml` or `.rustfmt.toml` in
target file directory or its parents to override the default settings of
rustfmt.
Expand Down