error: the compiler unexpectedly panicked. This is a bug
note: please make sure that you have updated to the latest nightly
note: rustc 1.98.0-nightly (40f92b3 2026-06-21) running on x86_64-unknown-linux-gnu
failures:
[ui] tests/rustdoc-ui/ice-bug-report-url.rs
Code
./x setup
- d) dist: Install Rust from source
- editor: none
./x.py build (successful)
./x.py test (failed)
Meta
rustc --version --verbose:
Ubuntu 26.04
rustc 1.96.0 (ac68faa20 2026-05-25)
`from x.py test`
note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/home/bill/.cargo -Z ignore-directory-in-diagnostics-source-blocks=/home/bill/Source/rust/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C debuginfo=0 -Z treat-err-as-bug
Error output
[ui] tests/rustdoc-ui/ice-bug-report-url.rs ... F
failures:
---- [ui] tests/rustdoc-ui/ice-bug-report-url.rs stdout ----
Saved the actual stderr to `/home/bill/Source/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/ice-bug-report-url/ice-bug-report-url.stderr`
diff of stderr:
5 | ^ expected one of `->`, `where`, or `{`
6
7
-
+ thread 'rustc' ($TID) panicked at /rustc-dev/40f92b37c4f7566de7348cec4d4c2a350da598d5/compiler/rustc_errors/src/lib.rs:1528:17:
9 aborting due to `-Z treat-err-as-bug=1`
10 stack backtrace:
11
Note: some mismatched output was normalized before being compared
- thread 'rustc' (809571) panicked at /rustc-dev/40f92b37c4f7566de7348cec4d4c2a350da598d5/compiler/rustc_errors/src/lib.rs:1528:17:
+ thread 'rustc' ($TID) panicked at /rustc-dev/40f92b37c4f7566de7348cec4d4c2a350da598d5/compiler/rustc_errors/src/lib.rs:1528:17:
The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args ice-bug-report-url.rs`
error: 1 errors occurred comparing output.
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/home/bill/Source/rust/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/home/bill/Source/rust/tests/rustdoc-ui/ice-bug-report-url.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/home/bill/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/home/bill/Source/rust/vendor" "--sysroot" "/home/bill/Source/rust/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-o" "/home/bill/Source/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/ice-bug-report-url" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Cdebuginfo=0" "-Ztreat-err-as-bug"
stdout: none
--- stderr -------------------------------
error: internal compiler error: expected one of `->`, `where`, or `{`, found `<eof>`
--> /home/bill/Source/rust/tests/rustdoc-ui/ice-bug-report-url.rs:12:10
|
LL | fn wrong()
| ^ expected one of `->`, `where`, or `{`
thread 'rustc' (809571) panicked at /rustc-dev/40f92b37c4f7566de7348cec4d4c2a350da598d5/compiler/rustc_errors/src/lib.rs:1528:17:
aborting due to `-Z treat-err-as-bug=1`
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: <rustc_errors::DiagCtxtInner>::emit_diagnostic::{closure#3}
3: rustc_interface::callbacks::track_diagnostic::<core::option::Option<rustc_span::ErrorGuaranteed>>
4: <rustc_errors::DiagCtxtInner>::emit_diagnostic
5: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
6: <rustc_errors::diagnostic::Diag>::emit_producing_error_guaranteed
7: rustc_interface::passes::parse
8: rustc_interface::interface::run_compiler::<(), rustdoc::main_args::{closure#2}>::{closure#1}
9: rustc_span::create_session_globals_then::<(), rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustdoc::main_args::{closure#2}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Backtrace
thread '<unnamed>' (682532) panicked at /rustc/40f92b37c4f7566de7348cec4d4c2a350da598d5/library/std/src/io/buffered/tests.rs:500:13:
explicit panic
stack backtrace:
. 0: 0x7a898ef6cf58 - <<std[.e379903bf91beeb3]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as .core[d692f880bcf230da]::fmt::Display>::fmt
1.: 0x7a898efafb1a - core[d692f880bcf230da]::fmt::write
. 2: 0x7a898ef7e912 - <std[e379903bf91beeb3]::sys::stdio::unix::Stderr as std[e379903bf91beeb3]::io::Write>::write_fmt
3: . 0x7a898ef3b8e6 - std[e379903bf91beeb3]::panicking::default_hook::{closure.#0}
4.: 0x7a898ef5e791 - .std[e379903bf91beeb3]::panicking::default_hook
. 5: 0x5c91ee1de28c - test[f45caf4769c5cfb9]::test_main_inner::<test.[f45caf4769c5cfb9]::test_main_static::{closure#0}>::{closure#0}
6: . 0x7a898ef5ea42 - std[e379903bf91beeb3]::panicking::panic_with_hook
7: . 0x7a898ef3b9d4 - std[e379903bf91beeb3]::panicking::panic_handler::{closure#0}
8: . 0x7a898ef321b9 - std[e379903bf91beeb3]::sys::backtrace::__rust_end_short_backtrace::<std[e379903bf91beeb3]::panicking::panic_handler::{closure#0}, !>
9: 0x7a898ef3d08d - __rustc[6deeacc863e2a460]::rust_begin_unwind
10: 0x7a898efb056c - core[d692f880bcf230da]::panicking::panic_fmt
11: 0x7a898efb0532 - core[d692f880bcf230da]::panicking::panic
12: 0x5c91ee0e94e1 - std[9b636181b4fcb102]::io::buffered::tests::panic_in_write_doesnt_flush_in_drop::{closure#.0}
13: 0x5c91ee0d8829 - std[9b636181b4fcb102]::sys::backtrace::__rust_begin_short_backtrace::<.std[9b636181b4fcb102]::io::buffered::tests::panic_in_write_doesnt_flush_in_drop::{closure#0}, ()>
. 14: 0x5c91ee0e3a91 - std[9b636181b4fcb102]::thread::.lifecycle::spawn_unchecked::<std[9b636181b4fcb102]::io::buffered::.tests::panic_in_write_doesnt_flush_in_drop::{closure#0}, ()>::{closure#1}
15: 0x5c91ee13f93f - .<std[9b636181b4fcb102]::sys::thread::unix::Thread>::new::thread_start
. 16: 0x7a898eca40da - start_thread
. at ./nptl/pthread_create.c:454:8
17: 0x7a898ed377ac - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0.
18: 0x0 - <unknown>
thread '<unnamed>' (682627) panicked at /rustc/40f92b37c4f7566de7348cec4d4c2a350da598d5/library/std/src/io/stdio/tests.rs:37:9:
explicit panic
stack backtrace:
.. 0: 0x7a898ef6cf58 - <<std[.e379903bf91beeb3]::sys::.backtrace::BacktraceLock>::print::DisplayBacktrace as core[d692f880bcf230da]::fmt::Display>::fmt
. 1: 0x7a898efafb1a. - core[d692f880bcf230da]::fmt::write
. 2: 0x7a898ef7e912 - <std[e379903bf91beeb3]::sys::stdio::unix::Stderr as .std[e379903bf91beeb3]::io::Write>::write_fmt
. 3: 0x7a898ef3b8e6 - std[e379903bf91beeb3]::panicking::default_hook::{closure#0}
4: 0x7a898ef5e791 - std[e379903bf91beeb3]::panicking::default_hook
5: 0x5c91ee1de28c - test[f45caf4769c5cfb9]::test_main_inner::<test[f45caf4769c5cfb9]::test_main_static::{closure#0}>::{closure#0}
6: 0x7a898ef5ea42 - std[e379903bf91beeb3]::panicking::panic_with_hook
7: 0x7a898ef3b9d4 - std[e379903bf91beeb3]::panicking::panic_handler::{closure#0}
8: 0x7a898ef321b9 - std[e379903bf91beeb3]::sys::backtrace::__rust_end_short_backtrace::<std[e379903bf91beeb3]::panicking::panic_handler::{closure#0}, !>
9: 0x7a898ef3d08d - __rustc[6deeacc863e2a460]::rust_begin_unwind
10: 0x7a898efb056c - core[d692f880bcf230da]::panicking::panic_fmt
11: 0x7a898efb0532 - core[d692f880bcf230da]::panicking::panic
12: 0x5c91ee0e915e - std[9b636181b4fcb102]::io::stdio::tests::panic_doesnt_poison::{closure#0}
13: 0x5c91ee0d8819 - std[9b636181b4fcb102]::sys::backtrace::__rust_begin_short_backtrace::<std[9b636181b4fcb102]::io::stdio::tests::panic_doesnt_poison.::{closure#0}, !>
14.: 0x5c91ee0e3b7e - std[9b636181b4fcb102].::thread::lifecycle::spawn_unchecked::<std[.9b636181b4fcb102]::io::stdio::tests::panic_doesnt_poison::{closure#0}, !>::{closure#1}::{closure#0}
15: 0x5c91ee14e7c9 - <core[d692f880bcf230da]::panic::unwind_safe::AssertUnwindSafe<std[9b636181b4fcb102]::thread::lifecycle::spawn_unchecked<std[9b636181b4fcb102]::io::stdio::tests::panic_doesnt_poison::{closure#0}, !>::{closure#1}::{closure#0}> as core[d692f880bcf230da]::ops::function::FnOnce<()>>::call_once
16: 0x5c91ee106ddc - <std[9b636181b4fcb102]::thread::lifecycle::spawn_unchecked<std.[9b636181b4fcb102]::io::stdio::tests::panic_doesnt_poison::{.closure#0}, !>::{closure#1.} as core[d692f880bcf230da]::ops::function.::FnOnce<()>>::call_once::{shim.:vtable#0}
. 17: 0x5c91ee13f93f - <.std[9b636181b4fcb102]::sys::thread::unix::Thread.>::new::thread_start
18: 0x7a898eca40da - start_thread
at ./nptl/pthread_create.c:454:8.
19: 0x7a898ed377ac - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
20: 0x0 - <unknown>
aborting due to panic at /rustc/40f92b37c4f7566de7348cec4d4c2a350da598d5/library/std/src/sys/process/unix/unix/tests.rs:60:27:
crash now!
.......... 528/563
..
thread '<unnamed>' (683460) panicked at /rustc/40f92b37c4f7566de7348cec4d4c2a350da598d5/library/std/src/thread/tests.rs:112:33:
explicit panic
stack backtrace:
0: 0x7a898ef6cf58 - <<std[e379903bf91beeb3]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[d692f880bcf230da]::fmt::Display>::fmt
1: 0x7a898efafb1a - core[d692f880bcf230da]::fmt::write
2: 0x7a898ef7e912 - <std[e379903bf91beeb3]::sys::stdio::unix::Stderr as std[e379903bf91beeb3]::io::Write>::write_fmt
3: 0x7a898ef3b8e6 - std[e379903bf91beeb3]::panicking::default_hook::{closure#0}
4: 0x7a898ef5e791 - std[e379903bf91beeb3]::panicking::default_hook
5: 0x5c91ee1de28c - test[f45caf4769c5cfb9]::test_main_inner::<test[f45caf4769c5cfb9]::test_main_static::{closure#0}>::{closure#0}
6: 0x7a898ef5ea42 - std[e379903bf91beeb3]::panicking::panic_with_hook
7: 0x7a898ef3b9d4 - std[e379903bf91beeb3]::panicking::panic_handler::{closure#0}
8: 0x7a898ef321b9 - std[e379903bf91beeb3]::sys::backtrace::__rust_end_short_backtrace::<std[e379903bf91beeb3]::panicking::panic_handler::{closure#0}, !>
9: 0x7a898ef3d08d - __rustc[6deeacc863e2a460]::rust_begin_unwind
10: 0x7a898efb056c - core[d692f880bcf230da]::panicking::panic_fmt
11: 0x7a898efb0532 - core[d692f880bcf230da]::panicking::panic
12: 0x5c91ee0d7abd - std[9b636181b4fcb102]::sys::backtrace::__rust_begin_short_backtrace::<std[9b636181b4fcb102]::thread::tests::test_join_panic::{closure#0}, ()>
13: 0x5c91ee0e3541 - std[9b636181b4fcb102]::thread::lifecycle::spawn_unchecked::<std[9b636181b4fcb102]::thread::tests::test_join_panic::{closure#0}, ()>::{closure#1}
14: 0x5c91ee13f93f - <std[9b636181b4fcb102]::sys::thread::unix::Thread>::new::thread_start
15: 0x7a898eca40da - start_thread
at ./nptl/pthread_create.c:454:8
16: 0x7a898ed377ac - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
17: 0x0 - <unknown>
.................
thread '<unnamed>' (683905) panicked at /rustc/40f92b37c4f7566de7348cec4d4c2a350da598d5/library/std/src/thread/tests.rs:250:9:
Box<dyn Any>
.
thread '<unnamed>' (683907) panicked at /rustc/40f92b37c4f7566de7348cec4d4c2a350da598d5/library/std/src/thread/tests.rs:233:9:
owned string
.
thread '<unnamed>' (683909) panicked at /rustc/40f92b37c4f7566de7348cec4d4c2a350da598d5/library/std/src/thread/tests.rs:270:33:
Box<dyn Any>
.
thread '<unnamed>' (683911) panicked at /rustc/40f92b37c4f7566de7348cec4d4c2a350da598d5/library/std/src/thread/tests.rs:216:9:
static string
stack backtrace:
0: 0x7a898ef6cf58 - <<std[e379903bf91beeb3]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[d692f880bcf230da]::fmt::Display>::fmt
1: 0x7a898efafb1a - core[d692f880bcf230da]::fmt::write
2: 0x7a898ef7e912 - <std[e379903bf91beeb3]::sys::stdio::unix::Stderr as std[e379903bf91beeb3]::io::Write>::write_fmt
3: 0x7a898ef3b8e6 - std[e379903bf91beeb3]::panicking::default_hook::{closure#0}
4: 0x7a898ef5e791 - std[e379903bf91beeb3]::panicking::default_hook
5: 0x5c91ee1de28c - test[f45caf4769c5cfb9]::test_main_inner::<test[f45caf4769c5cfb9]::test_main_static::{closure#0}>::{closure#0}
6: 0x7a898ef5ea42 - std[e379903bf91beeb3]::panicking::panic_with_hook
7: 0x7a898ef3b9d4 - std[e379903bf91beeb3]::panicking::panic_handler::{closure#0}
8: 0x7a898ef321b9 - std[e379903bf91beeb3]::sys::backtrace::__rust_end_short_backtrace::<std[e379903bf91beeb3]::panicking::panic_handler::{closure#0}, !>
9: 0x7a898ef3d08d - __rustc[6deeacc863e2a460]::rust_begin_unwind
10: 0x7a898efb056c - core[d692f880bcf230da]::panicking::panic_fmt
11: 0x5c91ee0d819d - std[9b636181b4fcb102]::sys::backtrace::__rust_begin_short_backtrace::<std[9b636181b4fcb102]::thread::tests::test_try_panic_message_string_literal::{closure#0}, ()>
12: 0x5c91ee0e3871 - std[9b636181b4fcb102]::thread::lifecycle::spawn_unchecked::<std[9b636181b4fcb102]::thread::tests::test_try_panic_message_string_literal::{closure#0}, ()>::{closure#1}
13: 0x5c91ee13f93f - <std[9b636181b4fcb102]::sys::thread::unix::Thread>::new::thread_start
14: 0x7a898eca40da - start_thread
at ./nptl/pthread_create.c:454:8
15: 0x7a898ed377ac - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
16: 0x0 - <unknown>
error: the compiler unexpectedly panicked. This is a bug
note: please make sure that you have updated to the latest nightly
note: rustc 1.98.0-nightly (40f92b3 2026-06-21) running on x86_64-unknown-linux-gnu
failures:
[ui] tests/rustdoc-ui/ice-bug-report-url.rs
Code
Meta
rustc --version --verbose:Error output
Backtrace