diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2020-08-30 22:17:24 -0400 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2020-08-30 22:17:24 -0400 |
| commit | d9208665b5eef883c025f44717f8c76afa871a94 (patch) | |
| tree | 176013005f76e7122dcf00a1de9a9a0d20e9db47 /compiler/rustc_interface/src | |
| parent | 36b0d7e25769e88fec85e1d073196065a7f2d7c4 (diff) | |
| download | rust-d9208665b5eef883c025f44717f8c76afa871a94.tar.gz rust-d9208665b5eef883c025f44717f8c76afa871a94.zip | |
Add `-Z proc-macro-backtrace` to allow showing proc-macro panics
Fixes #75050 Previously, we would unconditionally suppress the panic hook during proc-macro execution. This commit adds a new flag -Z proc-macro-backtrace, which allows running the panic hook for easier debugging.
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/tests.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 403aea8b304..f33dcec8ba7 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -291,6 +291,7 @@ fn configure_and_expand_inner<'a>( trace_mac: sess.opts.debugging_opts.trace_macros, should_test: sess.opts.test, span_debug: sess.opts.debugging_opts.span_debug, + proc_macro_backtrace: sess.opts.debugging_opts.proc_macro_backtrace, ..rustc_expand::expand::ExpansionConfig::default(crate_name.to_string()) }; diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index e94745519a4..cb906b3d911 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -502,6 +502,7 @@ fn test_debugging_options_tracking_hash() { untracked!(print_llvm_passes, true); untracked!(print_mono_items, Some(String::from("abc"))); untracked!(print_type_sizes, true); + untracked!(proc_macro_backtrace, true); untracked!(query_dep_graph, true); untracked!(query_stats, true); untracked!(save_analysis, true); |
