When running rustc fo.rs, the current output is
error: couldn't read `fo.rs`: No such file or directory (os error 2)
First of all, for the case where the compiler couldn't find the file, we should skip the (os error 2) and should be closer to
error: couldn't find file `fo.rs`
There are other cases (like the file exists but the user doesn't have the appropriate permissions) that should also have better wording instead of relying on the error's wording. (This will quickly run into diminishing returns, of course.)
But ideally, we should also go the extra mile and look for typos:
error: couldn't find file `fo.rs`
= help: you might have meant to open `foo.rs`: `rustc foo.rs`
When running
rustc fo.rs, the current output isFirst of all, for the case where the compiler couldn't find the file, we should skip the
(os error 2)and should be closer toThere are other cases (like the file exists but the user doesn't have the appropriate permissions) that should also have better wording instead of relying on the error's wording. (This will quickly run into diminishing returns, of course.)
But ideally, we should also go the extra mile and look for typos: