Skip to content

Conversation

@matthiaskrgr
Copy link
Member

No description provided.

@rust-highfive
Copy link

r? @ehuss

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 14, 2019
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Aug 14, 2019

📌 Commit 596ed63 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 14, 2019
@bors
Copy link
Contributor

bors commented Aug 14, 2019

⌛ Testing commit 596ed63 with merge 797f079...

bors added a commit that referenced this pull request Aug 14, 2019
unsafe {
let mut winsize: libc::winsize = mem::zeroed();
if libc::ioctl(libc::STDERR_FILENO, libc::TIOCGWINSZ.into(), &mut winsize) < 0 {
if libc::ioctl(libc::STDERR_FILENO, libc::TIOCGWINSZ, &mut winsize) < 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

This was changed specifically for freebsd, I don't think it should be modified.

Copy link
Member Author

Choose a reason for hiding this comment

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

Alright, I backed that one out.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add #[allow(clippy::identity_conversion)] with a comment explaining why?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

FWIW I'm personally not a fan of adding #[allow(clippy::...)] throughout the code, I find it pretty jarring to basically see a random distribution of clippy lints sprayed throughout the code. I think it's pretty bad style and is one of the reasons I'm not a fan of clippy, I'd rather not have a tool force me to randomly annotate code where it just otherwise causes bugs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be OK to add it to src/cargo/lib.rs with the rest of the list?

I agree there are too many false positives in clippy's default set, and that it can be too pedantic. However, I think there are enough cases where it does help simplify and clarify code, and even point out invalid code. For example, it points out a memory corruption issue in git2 that I've been meaning to fix, but haven't got around to.

I also think there should have been a comment here in the first place. A magical .into that only applies to one target that isn't even tested on CI should have something to explain why it is there.

Copy link
Member

Choose a reason for hiding this comment

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

Yes I think it'd at least be better to go in src/cargo/lib.rs. I also do understand that this is a pretty unproductive location to litigate this, it's not like anyone from clippy is watching this PR. I apologize for venting here :(

Copy link
Member Author

Choose a reason for hiding this comment

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

I suppressed the warning in lib.rs and reverted the change to shell.rs.

@alexcrichton
Copy link
Member

@bors: r-

@bors bors added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 14, 2019
@bors
Copy link
Contributor

bors commented Aug 14, 2019

☀️ Try build successful - checks-azure
Build commit: 797f079

@matthiaskrgr matthiaskrgr force-pushed the clippy_v6 branch 3 times, most recently from d20c78e to ccc7684 Compare August 15, 2019 10:57
@ehuss
Copy link
Contributor

ehuss commented Aug 19, 2019

Thanks, I pushed a small comment addition.

@bors r+

@bors
Copy link
Contributor

bors commented Aug 19, 2019

📌 Commit e3bb695 has been approved by ehuss

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. labels Aug 19, 2019
@bors
Copy link
Contributor

bors commented Aug 19, 2019

⌛ Testing commit e3bb695 with merge 7f16f05...

bors added a commit that referenced this pull request Aug 19, 2019
@bors
Copy link
Contributor

bors commented Aug 19, 2019

☀️ Test successful - checks-azure
Approved by: ehuss
Pushing 7f16f05 to master...

@bors bors merged commit e3bb695 into rust-lang:master Aug 19, 2019
@bors bors mentioned this pull request Aug 19, 2019
@ehuss ehuss added this to the 1.39.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants