rust/src/test/ui/crate-loading
Joshua Nelson 257ac1b498 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
```
2021-11-07 15:03:40 +00:00
..
auxiliary Improve error when an .rlib can't be parsed 2021-11-07 15:03:40 +00:00
crateresolve1.rs Work around different filenames for DLLs 2021-10-12 13:31:21 -07:00
crateresolve1.stderr Add long explanation for E0464 2021-10-12 13:10:12 -07:00
crateresolve2.rs Add test for showing rmeta candidates in error 2021-10-12 13:10:11 -07:00
crateresolve2.stderr Add long explanation for E0464 2021-10-12 13:10:12 -07:00
cross-compiled-proc-macro.rs Reuse CrateNum for proc-macro crates even when cross-compiling 2021-07-14 20:36:35 -04:00
invalid-rlib.rs Improve error when an .rlib can't be parsed 2021-11-07 15:03:40 +00:00
invalid-rlib.stderr Improve error when an .rlib can't be parsed 2021-11-07 15:03:40 +00:00
missing-std.rs Remove detection of rustup and cargo in 'missing extern crate' diagnostics 2021-07-24 01:29:42 +00:00
missing-std.stderr Remove detection of rustup and cargo in 'missing extern crate' diagnostics 2021-07-24 01:29:42 +00:00