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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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.

clippy_lints/src/io_other_error.rs Outdated Show resolved Hide resolved
clippy_lints/src/io_other_error.rs Outdated Show resolved Hide resolved
clippy_lints/src/io_other_error.rs Outdated Show resolved Hide resolved
clippy_lints/src/io_other_error.rs Outdated Show resolved Hide resolved
@llogiq llogiq force-pushed the io_other_error branch 4 times, most recently from 7e25198 to f7e2c9c Compare January 20, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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