-
Notifications
You must be signed in to change notification settings - Fork 102
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
Show OS error in the Display impl on Windows #133
Comments
There's an implementation of EDIT: this is I think is just the latest in the unending war-of-tug between the camps of "format the source error into Display" vs. "leave the presentation concerns to the end user". |
For all other error variants the actual OS error is printed in the Display impl. Also for rustc loading a dynamic library almost never fails. Proc macros are not dynamically linked against anything else and rustc verifies in advance that they were compiled by the right rustc version, so loading them should never fail. And in general I don't think rustc can really show pretty errors for loading dynamic libraries as the error causes are outside of the control of rustc and pretty diverse. All it can really do is print all information it has and hope someone can understand the root cause from it. |
Here are the guidelines I try to follow when I (and many others) implement
With that in mind…
If the consistency was absolutely required I would see making The only other way I can see to avoid changing rustc is to adopt an ecosystem-wide convention that involves the |
Closing. rust-lang/rust#119815 has fixed this on the rustc side. |
Currently the OS error is ignored at
rust_libloading/src/error.rs
Line 112 in 006afa9
The text was updated successfully, but these errors were encountered: