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

Tidy check for io::ErrorKind::Other in std code #102122

Open
Mark-Simulacrum opened this issue Sep 22, 2022 · 0 comments
Open

Tidy check for io::ErrorKind::Other in std code #102122

Mark-Simulacrum opened this issue Sep 22, 2022 · 0 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@Mark-Simulacrum
Copy link
Member

We have a note in the ErrorKind documentation:

This ErrorKind is not used by the standard library.

but in practice, there are cases were we do make use of it, whether in tests or by accident. We should add a check in tidy that the ErrorKind::Other string doesn't show up in std code, with an ability to opt-out similar to style checks (probably on the same line only would be best).

The ideal of course is a compiler check but I don't think there's much we can do there without a custom lint, which seems like way too much effort. The tidy check can miss things (e.g., glob imports), but that's OK.

@Mark-Simulacrum Mark-Simulacrum added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant