rust/compiler/rustc_metadata/src
bors 5fa94f3c57 Auto merge of #88368 - jyn514:metadata-error, r=petrochenkov
Improve error when an .rlib can't be parsed

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`
2021-11-07 23:03:55 +00:00
..
dynamic_lib
rmeta Rollup merge of #90202 - matthewjasper:xcrate-hygiene, r=petrochenkov 2021-10-30 20:30:27 +02:00
creader.rs ast: Fix naming conventions in AST structures 2021-11-07 21:38:17 +08:00
dependency_format.rs Move rustc_middle::middle::cstore to rustc_session. 2021-10-03 16:08:51 +02:00
dynamic_lib.rs Use #[non_exhaustive] where appropriate 2021-06-24 04:16:11 -04:00
foreign_modules.rs Move rustc_middle::middle::cstore to rustc_session. 2021-10-03 16:08:51 +02:00
lib.rs Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
locator.rs Improve error when an .rlib can't be parsed 2021-11-07 15:03:40 +00:00
native_libs.rs more clippy fixes 2021-11-07 16:59:05 +01:00