Skip to content

Allow print/write with multiple newlines #3014

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

Merged
merged 1 commit into from
Aug 14, 2018

Conversation

estk
Copy link
Contributor

@estk estk commented Aug 7, 2018

This PR resolves #2990.
It should now still disallow the single case and allow the case where there are more than one trailing newlines. Also, I updated the message for the lint to specify that it is for single newlines.

@Manishearth
Copy link
Member

r+

@Manishearth
Copy link
Member

(waiting on travis, which may also just fail because of rust versions until we land #2941)

@estk
Copy link
Contributor Author

estk commented Aug 7, 2018

Thanks @Manishearth , yeah additionally I noticed that clippy is not compiling on master for me locally since 328fea3.

evan:~/rust/rust-clippy# cargo test
   Compiling clippy_lints v0.0.212 (file:///Users/evan/rust/rust-clippy/clippy_lints)
error[E0004]: non-exhaustive patterns: `GlobalAsm(_)` not covered
   --> clippy_lints/src/utils/mod.rs:920:11
    |
920 |     match def {
    |           ^^^ pattern `GlobalAsm(_)` not covered
error: aborting due to previous error
For more information about this error, try `rustc --explain E0004`.
error: Could not compile `clippy_lints`.

@flip1995 flip1995 closed this Aug 14, 2018
@flip1995 flip1995 reopened this Aug 14, 2018
@flip1995 flip1995 merged commit b2a4013 into rust-lang:master Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not lint write_with_newline when there is more than one newline
3 participants