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

Include file name in IO errors (especially FileNotFound). #10404

Closed
orenbenkiki opened this issue Nov 10, 2013 · 5 comments
Closed

Include file name in IO errors (especially FileNotFound). #10404

orenbenkiki opened this issue Nov 10, 2013 · 5 comments

Comments

@orenbenkiki
Copy link

Here is an error message I just got (using the latest head version):

task '... failed at 'Unhandled condition: io_error: rt::io::IoError{kind: OtherIoError, desc: "no such file or directory", detail: None}', .../rust/src/libstd/condition.rs:131

It would be much easier to debug if the io error included the name of the offending file.

@itdaniher
Copy link
Contributor

I agree with the sentiment - working on tracking down the codepath that emits that error. Pain in the neck to debug!

@cadencemarseille
Copy link
Contributor

Probably depends on #10863

@pnkfelix
Copy link
Member

it would be great to fix this.

I skimmed over the code in std::io::mod briefly, and while the IoErrorKind enum seems easy enough to modify, the hard part is probably to extract the necessary info e.g. in rustuv::uv_error_to_io_error

cc @alexcrichton

@aturon
Copy link
Member

aturon commented Jun 2, 2014

cc me
cc @wycats

@alexcrichton
Copy link
Member

Closed by #14823

flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 2, 2023
…blyxyas

Add `unused_enumerate_index` lint

A lint for unused `.enumerate()` indexes (`for (_, x) in iter.enumerate()`).

I wasn't able to find a `rustc_span::sym::Enumerate`, so the code for checking that it's the correct `Enumerate` iterator is a bit weird.

---

changelog: New lint: [`unused_enumerate_index`]: A new lint for checking that the indexes from `.enumerate()` calls are used.
[rust-lang#10404](rust-lang/rust-clippy#10404)
<!-- changelog_checked -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants