about summary refs log tree commit diff
path: root/tests/rustdoc/enum/enum-variant-fields-heading.rs
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2025-05-04 18:11:49 -0400
committerGitHub <noreply@github.com>2025-05-04 18:11:49 -0400
commit5b3de49822fa1f7a078b447b54cf02afaa311a34 (patch)
tree68e6e20b2f01780a683f024a6a1b224805b39747 /tests/rustdoc/enum/enum-variant-fields-heading.rs
parent760d8daaeacf53c39bb4738786a53aa32b3b7372 (diff)
parent00d3fdce7cb36a8c3fa090f797bdd093665cbe93 (diff)
downloadrust-5b3de49822fa1f7a078b447b54cf02afaa311a34.tar.gz
rust-5b3de49822fa1f7a078b447b54cf02afaa311a34.zip
Rollup merge of #140627 - dtolnay:rustdoctracing, r=GuillaumeGomez
Allow linking rustc and rustdoc against the same single tracing crate

Alternate title: _Ignore "a global default trace dispatcher has already been set" error in Rustdoc_

By consecutively initializing `tracing` and `rustc_log`, Rustdoc assumes that these involve 2 different tracing crates.

I would like to be able to build rustdoc against the same tracing crate that rustc_log is also built against. Previously this arrangement would crash rustdoc:

```console
thread 'main' panicked at rust/compiler/rustc_log/src/lib.rs:142:65:
called `Result::unwrap()` on an `Err` value: SetGlobalDefaultError("a global default trace dispatcher has already been set")
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: rustc_log::init_logger
   4: rustc_driver_impl::init_logger
   5: rustdoc::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: 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-rustdoc&template=ice.md

note: please make sure that you have updated to the latest nightly

query stack during panic:
end of query stack
```
Diffstat (limited to 'tests/rustdoc/enum/enum-variant-fields-heading.rs')
0 files changed, 0 insertions, 0 deletions