Repository navigation
[ICE]: cargo doc fails for the crate galvyn #163528
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
Hi,
my crate galvyn does not build on docs.rs due to a compiler error.
I can reproduce it locally with a simple cargo +nightly doc.
The stable rust version seems fine.
Below are the outputs and versions for my local machine. You can also check https://docs.rs/crate/galvyn/latest/builds.
Code
I don't have a small snippet triggering the error.
If I find the time for it, I will search for one.
Meta
rustc --version --verbose:
rustc 1.101.0-nightly (5c543b0b8 2026-09-29)
binary: rustc
commit-hash: 5c543b0b8c73c7b72bc8284ced4fb22ead15734d
commit-date: 2026-09-29
host: x86_64-unknown-linux-gnu
release: 1.101.0-nightly
LLVM version: 23.1.1
Error output
note: no errors encountered even though delayed bugs were created
note: those delayed bugs will now be shown as internal compiler errors
error: internal compiler error: did not expect successful goal when collecting ambiguity errors for `Binder { value: OutlivesClause(Alias(No, Alias { kind: Projection { def_id: DefId(26:11 ~ tower_service[3c8e]::Service::Future) }, args: [axum::Router<()>, axum::http::Request<axum::body::Body>], .. }), 'static), bound_vars: [] }`
|
= note: delayed at /rustc-dev/5c543b0b8c73c7b72bc8284ced4fb22ead15734d/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs:140:29 - disabled backtrace
error: internal compiler error: did not expect successful goal when collecting ambiguity errors for `Binder { value: OutlivesClause(Alias(No, Alias { kind: Projection { def_id: DefId(26:11 ~ tower_service[3c8e]::Service::Future) }, args: [axum::routing::RouterAsService<'?0, axum::body::Body, ()>, axum::http::Request<axum::body::Body>], .. }), 'static), bound_vars: [] }`
|
= note: delayed at /rustc-dev/5c543b0b8c73c7b72bc8284ced4fb22ead15734d/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs:140:29 - disabled backtrace
error: internal compiler error: did not expect successful goal when collecting ambiguity errors for `Binder { value: OutlivesClause(Alias(No, Alias { kind: Projection { def_id: DefId(26:11 ~ tower_service[3c8e]::Service::Future) }, args: [axum::routing::RouterIntoService<axum::body::Body, ()>, axum::http::Request<axum::body::Body>], .. }), 'static), bound_vars: [] }`
|
= note: delayed at /rustc-dev/5c543b0b8c73c7b72bc8284ced4fb22ead15734d/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs:140:29 - disabled backtrace
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
note: please attach the file at `/home/user/git/galvyn/rustc-ice-2026-09-30T09_10_04-288396.txt` to your bug report
note: rustc 1.101.0-nightly (5c543b0b8 2026-09-29) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not document `galvyn`
Backtrace
error: internal compiler error: did not expect successful goal when collecting ambiguity errors for `Binder { value: OutlivesClause(Alias(No, Alias { kind: Projection { def_id: DefId(26:11 ~ tower_service[3c8e]::Service::Future) }, args: [axum::Router<()>, axum::http::Request<axum::body::Body>], .. }), 'static), bound_vars: [] }`
|
= note: delayed at /rustc-dev/5c543b0b8c73c7b72bc8284ced4fb22ead15734d/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs:140:29
0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
2: <rustc_errors::diagnostic::Diag>::emit_err
3: <rustc_errors::DiagCtxtHandle>::span_delayed_bug::<rustc_span::span_encoding::Span, alloc::string::String>
4: rustc_trait_selection::solve::fulfill::collect_remaining_errors_impl::<rustc_infer::traits::engine::ScrubbedTraitError>
5: <rustc_trait_selection::traits::engine::FulfillmentEngine<rustc_infer::traits::engine::ScrubbedTraitError> as rustc_infer::traits::engine::TraitEngine<rustc_infer::traits::engine::ScrubbedTraitError>>::evaluate_obligations_error_on_ambiguity
6: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
7: rustdoc::clean::utils::synthesize_auto_trait_and_blanket_impls
8: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
9: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
10: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
11: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
12: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
13: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
14: <rustc_session::session::Session>::time::<rustdoc::clean::types::Crate, rustdoc::passes::run::{closure#0}>
15: rustdoc::core::run_global_ctxt
16: rustdoc::main_args::{closure#2}::{closure#0}
17: rustc_interface::interface::run_compiler::<(), rustdoc::main_args::{closure#2}>::{closure#2}
18: std::sys::backtrace::__rust_begin_short_backtrace::<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#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
19: <std::thread::lifecycle::spawn_unchecked<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#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
20: <std::sys::thread::unix::Thread>::new::thread_start
21: <unknown>
22: <unknown>
error: internal compiler error: did not expect successful goal when collecting ambiguity errors for `Binder { value: OutlivesClause(Alias(No, Alias { kind: Projection { def_id: DefId(26:11 ~ tower_service[3c8e]::Service::Future) }, args: [axum::routing::RouterAsService<'?0, axum::body::Body, ()>, axum::http::Request<axum::body::Body>], .. }), 'static), bound_vars: [] }`
|
= note: delayed at /rustc-dev/5c543b0b8c73c7b72bc8284ced4fb22ead15734d/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs:140:29
0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
2: <rustc_errors::diagnostic::Diag>::emit_err
3: <rustc_errors::DiagCtxtHandle>::span_delayed_bug::<rustc_span::span_encoding::Span, alloc::string::String>
4: rustc_trait_selection::solve::fulfill::collect_remaining_errors_impl::<rustc_infer::traits::engine::ScrubbedTraitError>
5: <rustc_trait_selection::traits::engine::FulfillmentEngine<rustc_infer::traits::engine::ScrubbedTraitError> as rustc_infer::traits::engine::TraitEngine<rustc_infer::traits::engine::ScrubbedTraitError>>::evaluate_obligations_error_on_ambiguity
6: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
7: rustdoc::clean::utils::synthesize_auto_trait_and_blanket_impls
8: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
9: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
10: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
11: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
12: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
13: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
14: <rustc_session::session::Session>::time::<rustdoc::clean::types::Crate, rustdoc::passes::run::{closure#0}>
15: rustdoc::core::run_global_ctxt
16: rustdoc::main_args::{closure#2}::{closure#0}
17: rustc_interface::interface::run_compiler::<(), rustdoc::main_args::{closure#2}>::{closure#2}
18: std::sys::backtrace::__rust_begin_short_backtrace::<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#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
19: <std::thread::lifecycle::spawn_unchecked<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#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
20: <std::sys::thread::unix::Thread>::new::thread_start
21: <unknown>
22: <unknown>
error: internal compiler error: did not expect successful goal when collecting ambiguity errors for `Binder { value: OutlivesClause(Alias(No, Alias { kind: Projection { def_id: DefId(26:11 ~ tower_service[3c8e]::Service::Future) }, args: [axum::routing::RouterIntoService<axum::body::Body, ()>, axum::http::Request<axum::body::Body>], .. }), 'static), bound_vars: [] }`
|
= note: delayed at /rustc-dev/5c543b0b8c73c7b72bc8284ced4fb22ead15734d/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs:140:29
0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
2: <rustc_errors::diagnostic::Diag>::emit_err
3: <rustc_errors::DiagCtxtHandle>::span_delayed_bug::<rustc_span::span_encoding::Span, alloc::string::String>
4: rustc_trait_selection::solve::fulfill::collect_remaining_errors_impl::<rustc_infer::traits::engine::ScrubbedTraitError>
5: <rustc_trait_selection::traits::engine::FulfillmentEngine<rustc_infer::traits::engine::ScrubbedTraitError> as rustc_infer::traits::engine::TraitEngine<rustc_infer::traits::engine::ScrubbedTraitError>>::evaluate_obligations_error_on_ambiguity
6: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
7: rustdoc::clean::utils::synthesize_auto_trait_and_blanket_impls
8: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
9: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
10: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
11: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
12: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
13: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
14: <rustc_session::session::Session>::time::<rustdoc::clean::types::Crate, rustdoc::passes::run::{closure#0}>
15: rustdoc::core::run_global_ctxt
16: rustdoc::main_args::{closure#2}::{closure#0}
17: rustc_interface::interface::run_compiler::<(), rustdoc::main_args::{closure#2}>::{closure#2}
18: std::sys::backtrace::__rust_begin_short_backtrace::<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#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
19: <std::thread::lifecycle::spawn_unchecked<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#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
20: <std::sys::thread::unix::Thread>::new::thread_start
21: <unknown>
22: <unknown>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Activity
apiraino commentedon Sep 30, 2026
just by looking at the error, I think we have already other reports and possibly this could be fixed by #162782
gammelalf commentedon Sep 30, 2026
Sounds plausible.
I reduced
galvynto the minimal code:galvyn-corecontains several definition similar to the example of #162782.However,
galvyn-coreon its own works.gammelalf commentedon Sep 30, 2026
I reduced it some more:
I tried inline
galvyn-coreintogalvyn, the error would be gone.I also tried inlining the tower Service trait, the error would be gone.
And this reduced
galvyn-coreon its own works fine.https://github.com/myOmikron/galvyn/tree/ice-example
gammelalf commentedon Sep 30, 2026
Final minimal example: (produced by claude)
This is almost exactly the same as in #162782
FYI
(According to claude) The re-exports were necessary in my initial example to cause rustdoc to generate a page for the struct with a blanket implementation for the two traits. This can also be done by declaring everything in a single crate.
lcnr commentedon Oct 7, 2026
this has been fixed by #162782 afaict. Tried it out locally