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 suggestions for print/write with newline lint #4136

Merged
merged 1 commit into from
Jun 6, 2019

Conversation

euclio
Copy link
Contributor

@euclio euclio commented May 24, 2019

changelog: Add machine-applicable suggestions for print!/write! with newline lints.

@mati865
Copy link
Contributor

mati865 commented May 24, 2019

CI error:

error: this argument is passed by reference, but would be more efficient if passed by value
   --> clippy_lints/src/write.rs:276:43
    |
276 | fn newline_span(fmt_str: &str, str_style: &StrStyle, sp: Span) -> Span {
    |                                           ^^^^^^^^^ help: consider passing by value instead: `StrStyle`
    |
    = note: `-D clippy::trivially-copy-pass-by-ref` implied by `-D clippy::all`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref
error: aborting due to previous error

@euclio euclio force-pushed the println-writeln-suggestions branch 2 times, most recently from 6dab0a1 to 01af71e Compare May 24, 2019 18:55
@euclio
Copy link
Contributor Author

euclio commented May 24, 2019

@mati865 Fixed.

Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM over all.

clippy_lints/src/write.rs Outdated Show resolved Hide resolved
@flip1995 flip1995 added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label May 28, 2019
@euclio euclio force-pushed the println-writeln-suggestions branch from 01af71e to ff4a81b Compare May 30, 2019 15:12
clippy_lints/src/write.rs Outdated Show resolved Hide resolved
@euclio euclio force-pushed the println-writeln-suggestions branch from ff4a81b to 2d0c797 Compare May 30, 2019 17:46
@euclio
Copy link
Contributor Author

euclio commented Jun 6, 2019

@flip1995 Friendly ping. Anything else I need to take care of?

@flip1995
Copy link
Member

flip1995 commented Jun 6, 2019

Thanks for the ping! Totally forgot about this, sorry.

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 6, 2019

📌 Commit 2d0c797 has been approved by flip1995

@bors
Copy link
Collaborator

bors commented Jun 6, 2019

⌛ Testing commit 2d0c797 with merge 5be4e71...

bors added a commit that referenced this pull request Jun 6, 2019
add suggestions for print/write with newline lint

changelog: Add machine-applicable suggestions for `print!`/`write!` with newline lints.
@bors
Copy link
Collaborator

bors commented Jun 6, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing 5be4e71 to master...

@bors bors merged commit 2d0c797 into rust-lang:master Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants