rust/compiler
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
..
rustc
rustc_apfloat Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
rustc_arena
rustc_ast Rollup merge of #90642 - matthiaskrgr:clippy_matches, r=cjgillot 2021-11-06 23:12:05 +01:00
rustc_ast_lowering Add features gates for experimental asm features 2021-11-07 01:23:53 +00:00
rustc_ast_passes Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
rustc_ast_pretty Some "parenthesis" and "parentheses" fixes 2021-10-17 12:04:01 +02:00
rustc_attr Correct typo 2021-10-16 13:36:05 -07:00
rustc_borrowck use matches!() macro in more places 2021-11-06 16:13:14 +01:00
rustc_builtin_macros Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
rustc_codegen_cranelift Make hash_result an Option. 2021-10-20 18:29:18 +02:00
rustc_codegen_gcc Auto merge of #89652 - rcvalle:rust-cfi, r=nagisa 2021-10-27 09:19:42 +00:00
rustc_codegen_llvm Auto merge of #90617 - tmiasko:time-trace-threads, r=wesleywiser 2021-11-06 09:55:50 +00:00
rustc_codegen_ssa Rollup merge of #90642 - matthiaskrgr:clippy_matches, r=cjgillot 2021-11-06 23:12:05 +01:00
rustc_const_eval use matches!() macro in more places 2021-11-06 16:13:14 +01:00
rustc_data_structures Auto merge of #90380 - Mark-Simulacrum:revert-89558-query-stable-lint, r=lcnr 2021-10-29 04:55:51 +00:00
rustc_driver Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
rustc_error_codes Improve error when an .rlib can't be parsed 2021-11-07 15:03:40 +00:00
rustc_errors Lint against RTL unicode codepoints in literals and comments 2021-10-31 13:14:04 +01:00
rustc_expand Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
rustc_feature Add features gates for experimental asm features 2021-11-07 01:23:53 +00:00
rustc_fs_util
rustc_graphviz Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
rustc_hir Auto merge of #90406 - nbdd0121:panic, r=cjgillot 2021-11-01 17:18:57 +00:00
rustc_hir_pretty Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister 2021-10-18 19:53:05 +00:00
rustc_incremental Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
rustc_index update cfg(bootstrap) 2021-10-23 21:55:57 -04:00
rustc_infer Auto merge of #89970 - jackh726:gats_diagnostics, r=nikomatsakis 2021-11-06 04:15:22 +00:00
rustc_interface Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
rustc_lexer use matches!() macro in more places 2021-11-06 16:13:14 +01:00
rustc_lint Optimize literal, doc comment lint as well, extract function. 2021-11-04 23:31:42 +01:00
rustc_lint_defs Properly register text_direction_codepoint_in_comment lint. 2021-11-05 20:12:40 +01:00
rustc_llvm Initialize LLVM time trace profiler on each code generation thread 2021-11-05 17:47:11 +01:00
rustc_macros Avoid a branch on key being local for queries that use the same local and extern providers 2021-10-25 13:36:23 +02:00
rustc_metadata Improve error when an .rlib can't be parsed 2021-11-07 15:03:40 +00:00
rustc_middle Auto merge of #90661 - matthiaskrgr:rollup-1umbdlx, r=matthiaskrgr 2021-11-06 22:55:37 +00:00
rustc_mir_build Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
rustc_mir_dataflow Remove MaybeMutBorrowedLocals 2021-11-03 16:43:12 +01:00
rustc_mir_transform Rollup merge of #90649 - cjgillot:reveal-all-2, r=lcnr 2021-11-06 23:12:06 +01:00
rustc_monomorphize clippy::perf fixes 2021-11-04 21:07:56 +01:00
rustc_parse Remove now unused feature from rustc_parse 2021-11-04 23:40:59 +01:00
rustc_parse_format
rustc_passes Rollup merge of #90374 - GuillaumeGomez:unify-rustdoc-book-titles, r=camelid 2021-10-30 14:37:00 +02:00
rustc_plugin_impl
rustc_privacy Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
rustc_query_impl Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
rustc_query_system Auto merge of #90380 - Mark-Simulacrum:revert-89558-query-stable-lint, r=lcnr 2021-10-29 04:55:51 +00:00
rustc_resolve Replace some uses of vec.drain(..) with vec.into_iter() 2021-11-06 19:04:31 +01:00
rustc_save_analysis clippy::perf fixes 2021-11-04 21:07:56 +01:00
rustc_serialize Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
rustc_session Update the documented default of -Zmutable-noalias 2021-11-05 12:01:59 -07:00
rustc_span Auto merge of #90348 - Amanieu:asm_feature_gates, r=joshtriplett 2021-11-07 04:59:42 +00:00
rustc_symbol_mangling Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
rustc_target Update LLVM comments around NoAliasMutRef 2021-11-05 12:22:51 -07:00
rustc_trait_selection use matches!() macro in more places 2021-11-06 16:13:14 +01:00
rustc_traits Move some outlives bounds things from rustc_trait_selection to rustc_typeck 2021-10-15 12:14:19 -04:00
rustc_ty_utils Auto merge of #90218 - JakobDegen:adt_significant_drop_fix, r=nikomatsakis 2021-10-28 16:03:13 +00:00
rustc_type_ir
rustc_typeck Rollup merge of #90646 - BoxyUwU:funky_ice, r=estebank 2021-11-06 23:12:06 +01:00