![](/style/images/good.png)
![](/style/images/bad.png)
Improve error when an .rlib can't be parsed by jyn514 · Pull Request #88368 · ru...
source link: https://github.com/rust-lang/rust/pull/88368
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This usually describes either an error in the compiler itself or some
sort of IO error. Either way, we should report it to the user rather
than just saying "crate not found".
This only gives an error if the crate couldn't be loaded at all - if the
compiler finds another .rlib or .rmeta file which was valid, it will
continue to compile the crate.
Example output:
error[E0785]: found invalid metadata files for crate `foo`
--> bar.rs:3:24
|
3 | println!("{}", foo::FOO_11_49[0]);
| ^^^
|
= warning: failed to parse rlib '/home/joshua/test-rustdoc/libfoo.rlib': Invalid archive extended name offset
cc @ehuss
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK