Skip to content
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

Improve error when an .rlib can't be parsed #88368

Merged
merged 1 commit into from
Nov 8, 2021

Commits on Nov 7, 2021

  1. 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
    ```
    jyn514 committed Nov 7, 2021
    Configuration menu
    Copy the full SHA
    257ac1b View commit details
    Browse the repository at this point in the history