rust/compiler
Yuki Okushi 9298bd8197
Rollup merge of #92310 - ehuss:rustdoc-ice, r=estebank
rustdoc: Fix ICE report

The ICE report in rustdoc was confusing because it was returning an argument parse error:

```
thread 'rustc' panicked at 'aborting due to `-Z treat-err-as-bug=1`', compiler/rustc_errors/src/lib.rs:1212:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

error: Unrecognized option: 'crate-version'
```

This is because the ICE reporter was trying to parse the arguments as rustc, not rustdoc.  Since an argument error is a fatal error, it was early-exiting with the argument error due to unwinding.

This changes it to be a more primitive scan of the arguments. The arguments being checked are pretty simple, and only have a small handful of forms that are easy to check for.

It now looks like this:

```
thread 'rustc' panicked at 'aborting due to `-Z treat-err-as-bug=1`', compiler/rustc_errors/src/lib.rs:1212:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.59.0-dev running on x86_64-apple-darwin

note: compiler flags: --crate-type lib -Z treat-err-as-bug

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
```

It still says `rustc`, but I can live with that.
2022-02-03 22:20:23 +09:00
..
rustc
rustc_apfloat
rustc_arena Remove unused dep from rustc_arena 2022-02-02 17:37:14 +01:00
rustc_ast
rustc_ast_lowering More let_else adoptions 2022-02-02 17:11:01 +01:00
rustc_ast_passes add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_ast_pretty Allow any line to have at least 60 chars 2022-01-31 10:56:57 -08:00
rustc_attr More let_else adoptions 2022-02-02 17:11:01 +01:00
rustc_borrowck Rollup merge of #93590 - est31:let_else, r=lcnr 2022-02-02 19:34:07 +01:00
rustc_builtin_macros add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_codegen_cranelift
rustc_codegen_gcc
rustc_codegen_llvm Auto merge of #93154 - michaelwoerister:fix-generic-closure-and-generator-debuginfo, r=wesleywiser 2022-02-02 12:37:28 +00:00
rustc_codegen_ssa Auto merge of #93154 - michaelwoerister:fix-generic-closure-and-generator-debuginfo, r=wesleywiser 2022-02-02 12:37:28 +00:00
rustc_const_eval Rollup merge of #93546 - tmiasko:validate-switch-int, r=oli-obk 2022-02-02 19:34:04 +01:00
rustc_data_structures Auto merge of #93432 - Kobzol:stable-hash-isize-hash-compression, r=the8472 2022-02-03 01:08:45 +00:00
rustc_driver Rollup merge of #92310 - ehuss:rustdoc-ice, r=estebank 2022-02-03 22:20:23 +09:00
rustc_error_codes
rustc_errors add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_expand add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_feature add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #93285 - JulianKnodt:const_eq_2, r=oli-obk 2022-02-01 23:18:01 +00:00
rustc_hir_pretty
rustc_incremental add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_index implement lint for suspicious auto trait impls 2022-02-01 09:55:19 +01:00
rustc_infer Auto merge of #93285 - JulianKnodt:const_eq_2, r=oli-obk 2022-02-01 23:18:01 +00:00
rustc_interface Auto merge of #93466 - cjgillot:query-dead, r=nagisa 2022-02-02 02:29:32 +00:00
rustc_lexer
rustc_lint Rollup merge of #93290 - lcnr:same_type, r=jackh726 2022-02-01 16:08:05 +01:00
rustc_lint_defs implement lint for suspicious auto trait impls 2022-02-01 09:55:19 +01:00
rustc_llvm
rustc_log
rustc_macros
rustc_metadata add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_middle Auto merge of #93312 - pierwill:map-all-local-trait-impls, r=cjgillot 2022-02-02 15:36:12 +00:00
rustc_mir_build More let_else adoptions 2022-02-02 17:11:01 +01:00
rustc_mir_dataflow
rustc_mir_transform Rollup merge of #93290 - lcnr:same_type, r=jackh726 2022-02-01 16:08:05 +01:00
rustc_monomorphize add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_parse better suggestion for duplicated where 2022-02-02 00:29:45 -08:00
rustc_parse_format
rustc_passes Auto merge of #93466 - cjgillot:query-dead, r=nagisa 2022-02-02 02:29:32 +00:00
rustc_plugin_impl
rustc_privacy add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_query_impl add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_query_system add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_resolve Auto merge of #93312 - pierwill:map-all-local-trait-impls, r=cjgillot 2022-02-02 15:36:12 +00:00
rustc_save_analysis More let_else adoptions 2022-02-02 17:11:01 +01:00
rustc_serialize Remove two unnecessary transmutes from opaque Encoder and Decoder 2022-01-31 18:25:05 +01:00
rustc_session Add missing | between print options 2022-02-01 12:40:01 -08:00
rustc_span add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_symbol_mangling add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
rustc_target Rollup merge of #92021 - woodenarrow:br_single_fp_element, r=Mark-Simulacrum 2022-02-01 16:08:03 +01:00
rustc_trait_selection Auto merge of #93285 - JulianKnodt:const_eq_2, r=oli-obk 2022-02-01 23:18:01 +00:00
rustc_traits
rustc_ty_utils remove TyS::same_type 2022-02-01 11:21:26 +01:00
rustc_type_ir
rustc_typeck don't suggest adding let due to expressions inside of while loop 2022-02-01 23:27:04 -08:00