diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-02-03 22:20:23 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-03 22:20:23 +0900 |
| commit | 9298bd8197ebffac1d310ff90f5845a30a512a23 (patch) | |
| tree | 4a44ec6f0fccf4154d2861471a4ef577d87ea52f /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 796bf14f2e129283d9daee7f05d14c2dfa76d643 (diff) | |
| parent | 4413141ea96cfe4edbe417f352b13160556bd48e (diff) | |
| download | rust-9298bd8197ebffac1d310ff90f5845a30a512a23.tar.gz rust-9298bd8197ebffac1d310ff90f5845a30a512a23.zip | |
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
