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 suggestion to print_with_newline #2319

Closed
killercup opened this issue Jan 3, 2018 · 2 comments
Closed

Add suggestion to print_with_newline #2319

killercup opened this issue Jan 3, 2018 · 2 comments

Comments

@killercup
Copy link
Member

This code

fn main() {
    println!("");
}

currently (clippy 0.0.177) triggers this:

warning: using `println!("")`, consider using `println!()` instead
 --> src/main.rs:2:5
  |
2 |     println!("");
  |     ^^^^^^^^^^^^^
  |
  = note: #[warn(print_with_newline)] on by default
  = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.177/index.html#print_with_newline

where the suggested replacement is only in the warning: line, but is not a true, auto-applicable suggestion.

@ghost
Copy link

ghost commented Jan 4, 2018

Why is changing println!("") to println!() not applicable?

@killercup
Copy link
Member Author

killercup commented Jan 4, 2018 via email

killercup added a commit to killercup/rust-clippy that referenced this issue Jan 4, 2018
killercup added a commit to killercup/rust-clippy that referenced this issue Jan 4, 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

No branches or pull requests

1 participant