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 io_other_error lint #14022

Merged
merged 1 commit into from
Feb 21, 2025
Merged

add io_other_error lint #14022

merged 1 commit into from
Feb 21, 2025

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Jan 18, 2025

fixes #12717.

r? @xFrednet


changelog: add [io_other_error] lint

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 18, 2025
/// `io::ErrorKind::Other`.
///
/// ### Why is this bad?
/// Since Rust 1.74, there's the `io::Error::other(_)` shortcut.
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it unusual to include the MSRV in the lint description?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure, but I figure it isn't too wordy here.

@llogiq llogiq force-pushed the io_other_error branch 5 times, most recently from f7e2c9c to f295278 Compare January 20, 2025 17:35
Copy link
Member

@xFrednet xFrednet left a comment

Choose a reason for hiding this comment

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

Two small nits, otherwise, solid implementation.

(Sorry for the delay with the review)

@llogiq llogiq force-pushed the io_other_error branch 3 times, most recently from 9026e56 to c815bc4 Compare February 4, 2025 13:08
@llogiq
Copy link
Contributor Author

llogiq commented Feb 12, 2025

@xFrednet ping? Do you agree to merge as it is? I'll do the path shortening stuff in another PR.

@xFrednet
Copy link
Member

xFrednet commented Feb 13, 2025

This version looks good to me, I though I already created an FCP (which is why I was waiting), but can't find it now. I'll create one. :)

Edit: FCP https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/FCP.3A.20io_other_error

@xFrednet xFrednet added S-final-comment-period Status: final comment period it will be merged unless new objections are raised (~1 week) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Feb 13, 2025
@llogiq llogiq force-pushed the io_other_error branch 5 times, most recently from 1844b23 to 7639c6c Compare February 21, 2025 21:02
@llogiq
Copy link
Contributor Author

llogiq commented Feb 21, 2025

@xFrednet shall we merge this as the FCP has run for a week?

@xFrednet
Copy link
Member

Jup, let's get this merged.


Roses are red,
Violets are blue,
A new Rust version,
More to do.

MSRV a config in clippy,
makes lints less slippy.
these changes now,
look good enough

@xFrednet xFrednet added this pull request to the merge queue Feb 21, 2025
Merged via the queue into rust-lang:master with commit e479a9f Feb 21, 2025
11 checks passed
@llogiq llogiq deleted the io_other_error branch February 21, 2025 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-final-comment-period Status: final comment period it will be merged unless new objections are raised (~1 week)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

io::Error::new(io::ErrorKind::Other, ..)
6 participants