Skip to content

[ICE]: rustdoc: next solver cannot find '!BoundConst { var: 0, .. }' in param-env: ParamEnv #159065

Description

@matthiaskrgr

Code

rustdoc code.rs -Znext-solver=globally -Znormalize-docs

#[doc(inline)]
pub use std as other;

Meta

rustc --version --verbose:

rustdoc 1.99.0-nightly (af3d95584 2026-07-09)
binary: rustdoc
commit-hash: af3d95584dbddcae597890340995509a7fb47a50
commit-date: 2026-07-09
host: x86_64-unknown-linux-gnu
release: 1.99.0-nightly
LLVM version: 22.1.8

Error output

<output>
Backtrace


thread 'rustc' (1844961) panicked at /rustc-dev/af3d95584dbddcae597890340995509a7fb47a50/compiler/rustc_type_ir/src/binder.rs:1317:13:
cannot find `!BoundConst { var: 0, .. }` in param-env: ParamEnv {
    caller_bounds: [],
}
stack backtrace:
   0:     0x7f08f1d0d266 - <<std[40ec4738f960212f]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[f94227772a84a350]::fmt::Display>::fmt
   1:     0x7f08f240ee08 - core[f94227772a84a350]::fmt::write
   2:     0x7f08f1d2264c - <std[40ec4738f960212f]::sys::stdio::unix::Stderr as std[40ec4738f960212f]::io::Write>::write_fmt
   3:     0x7f08f1ce156a - std[40ec4738f960212f]::panicking::default_hook::{closure#0}
   4:     0x7f08f1cff923 - std[40ec4738f960212f]::panicking::default_hook
   5:     0x7f08f0ce4828 - std[40ec4738f960212f]::panicking::update_hook::<alloc[15af67eb22419dcd]::boxed::Box<rustc_driver_impl[4720cc46e2ef7529]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f08f1cffdc2 - std[40ec4738f960212f]::panicking::panic_with_hook
   7:     0x7f08f1ce1622 - std[40ec4738f960212f]::panicking::panic_handler::{closure#0}
   8:     0x7f08f1cd5b09 - std[40ec4738f960212f]::sys::backtrace::__rust_end_short_backtrace::<std[40ec4738f960212f]::panicking::panic_handler::{closure#0}, !>
   9:     0x7f08f1ce2f8d - __rustc[4a4b9b94957988a7]::rust_begin_unwind
  10:     0x7f08eee7b3dc - core[f94227772a84a350]::panicking::panic_fmt
  11:     0x7f08f364eed6 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate> as rustc_type_ir[d247da7ee518b5fa]::search_graph::Delegate>::compute_goal::{closure#0}
  12:     0x7f08ef65c803 - <rustc_type_ir[d247da7ee518b5fa]::search_graph::SearchGraph<rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate>, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_goal::{closure#0}
  13:     0x7f08f2fc1b63 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_goal_cold
  14:     0x7f08f2fad828 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_added_goals_step
  15:     0x7f08f3154603 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_added_goals_and_make_canonical_response::{closure#0}
  16:     0x7f08f314e94a - <rustc_type_ir[d247da7ee518b5fa]::predicate::TraitPredicate<rustc_middle[422739edb7f5a344]::ty::context::TyCtxt> as rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::assembly::GoalKind<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::consider_impl_candidate::<<rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::assemble_impl_candidates<rustc_type_ir[d247da7ee518b5fa]::predicate::TraitPredicate<rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::{closure#0}::{closure#0}>
  17:     0x7f08f39d9843 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::compute_trait_goal
  18:     0x7f08f364b096 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate> as rustc_type_ir[d247da7ee518b5fa]::search_graph::Delegate>::compute_goal::{closure#0}
  19:     0x7f08ef65c803 - <rustc_type_ir[d247da7ee518b5fa]::search_graph::SearchGraph<rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate>, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_goal::{closure#0}
  20:     0x7f08f2fc1b63 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_goal_cold
  21:     0x7f08f2fad828 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_added_goals_step
  22:     0x7f08f3154603 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_added_goals_and_make_canonical_response::{closure#0}
  23:     0x7f08f314e94a - <rustc_type_ir[d247da7ee518b5fa]::predicate::TraitPredicate<rustc_middle[422739edb7f5a344]::ty::context::TyCtxt> as rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::assembly::GoalKind<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::consider_impl_candidate::<<rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::assemble_impl_candidates<rustc_type_ir[d247da7ee518b5fa]::predicate::TraitPredicate<rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::{closure#0}::{closure#0}>
  24:     0x7f08f39d9843 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::compute_trait_goal
  25:     0x7f08f364bc7e - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate> as rustc_type_ir[d247da7ee518b5fa]::search_graph::Delegate>::compute_goal::{closure#0}
  26:     0x7f08ef65c803 - <rustc_type_ir[d247da7ee518b5fa]::search_graph::SearchGraph<rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate>, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_goal::{closure#0}
  27:     0x7f08f2fc1b63 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_goal_cold
  28:     0x7f08f364b93e - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate> as rustc_type_ir[d247da7ee518b5fa]::search_graph::Delegate>::compute_goal::{closure#0}
  29:     0x7f08ef65c803 - <rustc_type_ir[d247da7ee518b5fa]::search_graph::SearchGraph<rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate>, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_goal::{closure#0}
  30:     0x7f08f2fc1b63 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::evaluate_goal_cold
  31:     0x55646d0e4c8a - <rustc_trait_selection[27d012fca9780532]::solve::delegate::SolverDelegate as rustc_next_trait_solver[5e27b30a7c27b9e6]::solve::eval_ctxt::SolverDelegateEvalExt>::evaluate_root_goal
  32:     0x55646cf38b71 - <rustc_next_trait_solver[5e27b30a7c27b9e6]::normalize::NormalizationFolder<rustc_infer[746a1668c57c4cb2]::infer::InferCtxt, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt, rustc_trait_selection[27d012fca9780532]::solve::normalize::normalize_with_universes<rustc_type_ir[d247da7ee518b5fa]::binder::Binder<rustc_middle[422739edb7f5a344]::ty::context::TyCtxt, rustc_type_ir[d247da7ee518b5fa]::predicate::OutlivesPredicate<rustc_middle[422739edb7f5a344]::ty::context::TyCtxt, rustc_middle[422739edb7f5a344]::ty::Ty>>>::{closure#0}>>::normalize_alias_term
  33:     0x55646cef5fbe - <rustc_next_trait_solver[5e27b30a7c27b9e6]::normalize::NormalizationFolder<rustc_infer[746a1668c57c4cb2]::infer::InferCtxt, rustc_middle[422739edb7f5a344]::ty::context::TyCtxt, rustc_trait_selection[27d012fca9780532]::solve::normalize::normalize_with_universes<rustc_type_ir[d247da7ee518b5fa]::binder::Binder<rustc_middle[422739edb7f5a344]::ty::context::TyCtxt, rustc_middle[422739edb7f5a344]::ty::Ty>>::{closure#0}> as rustc_type_ir[d247da7ee518b5fa]::fold::FallibleTypeFolder<rustc_middle[422739edb7f5a344]::ty::context::TyCtxt>>::try_fold_ty::{closure#0}
  34:     0x55646ce7ed40 - <rustc_infer[746a1668c57c4cb2]::infer::at::At as rustc_trait_selection[27d012fca9780532]::traits::query::normalize::QueryNormalizeExt>::query_normalize::<rustc_type_ir[d247da7ee518b5fa]::binder::Binder<rustc_middle[422739edb7f5a344]::ty::context::TyCtxt, rustc_middle[422739edb7f5a344]::ty::Ty>>
  35:     0x55646cfb8db4 - rustdoc[5842327c84a5b3ea]::clean::normalize
  36:     0x55646cfa255f - rustdoc[5842327c84a5b3ea]::clean::clean_middle_ty
  37:     0x55646cfa5e3d - rustdoc[5842327c84a5b3ea]::clean::clean_predicate
  38:     0x55646d0ea935 - <core[f94227772a84a350]::iter::adapters::chain::Chain<core[f94227772a84a350]::iter::adapters::flatten::FlatMap<core[f94227772a84a350]::iter::adapters::map::Map<core[f94227772a84a350]::iter::adapters::filter::Filter<core[f94227772a84a350]::iter::adapters::copied::Copied<core[f94227772a84a350]::slice::iter::Iter<rustc_middle[422739edb7f5a344]::ty::predicate::Clause>>, rustdoc[5842327c84a5b3ea]::clean::auto_trait::clean_param_env::{closure#2}>, rustdoc[5842327c84a5b3ea]::clean::auto_trait::clean_param_env::{closure#3}>, core[f94227772a84a350]::option::Option<rustdoc[5842327c84a5b3ea]::clean::types::WherePredicate>, rustdoc[5842327c84a5b3ea]::clean::auto_trait::clean_param_env::{closure#4}>, thin_vec[7ecaf0422a4a7260]::IntoIter<rustdoc[5842327c84a5b3ea]::clean::types::WherePredicate>> as core[f94227772a84a350]::iter::traits::iterator::Iterator>::next
  39:     0x55646cfdfb82 - rustdoc[5842327c84a5b3ea]::clean::auto_trait::clean_param_env
  40:     0x55646cd4af59 - <rustc_trait_selection[27d012fca9780532]::traits::auto_trait::AutoTraitFinder>::find_auto_trait_generics::<rustdoc[5842327c84a5b3ea]::clean::types::Generics, rustdoc[5842327c84a5b3ea]::clean::auto_trait::synthesize_auto_trait_impl::{closure#0}>
  41:     0x55646cfe1026 - rustdoc[5842327c84a5b3ea]::clean::auto_trait::synthesize_auto_trait_impl
  42:     0x55646cfe80c3 - rustdoc[5842327c84a5b3ea]::clean::utils::synthesize_auto_trait_and_blanket_impls
  43:     0x55646d02f6f2 - <rustdoc[5842327c84a5b3ea]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[5842327c84a5b3ea]::visit::DocVisitor>::visit_item
  44:     0x55646d02f509 - <rustdoc[5842327c84a5b3ea]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[5842327c84a5b3ea]::visit::DocVisitor>::visit_item
  45:     0x55646d02f509 - <rustdoc[5842327c84a5b3ea]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[5842327c84a5b3ea]::visit::DocVisitor>::visit_item
  46:     0x55646d02f509 - <rustdoc[5842327c84a5b3ea]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[5842327c84a5b3ea]::visit::DocVisitor>::visit_item
  47:     0x55646d02f509 - <rustdoc[5842327c84a5b3ea]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[5842327c84a5b3ea]::visit::DocVisitor>::visit_item
  48:     0x55646cff5d54 - rustdoc[5842327c84a5b3ea]::passes::collect_trait_impls::collect_trait_impls
  49:     0x55646cf992ed - rustdoc[5842327c84a5b3ea]::core::run_global_ctxt
  50:     0x55646cecf486 - rustdoc[5842327c84a5b3ea]::main_args::{closure#2}::{closure#0}
  51:     0x55646cec6e8a - rustc_interface[96c4102e2fe97684]::interface::run_compiler::<(), rustdoc[5842327c84a5b3ea]::main_args::{closure#2}>::{closure#1}
  52:     0x55646ce15c58 - std[40ec4738f960212f]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[96c4102e2fe97684]::util::run_in_thread_with_globals<rustc_interface[96c4102e2fe97684]::util::run_in_thread_pool_with_globals<rustc_interface[96c4102e2fe97684]::interface::run_compiler<(), rustdoc[5842327c84a5b3ea]::main_args::{closure#2}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  53:     0x55646cf0655d - <std[40ec4738f960212f]::thread::lifecycle::spawn_unchecked<rustc_interface[96c4102e2fe97684]::util::run_in_thread_with_globals<rustc_interface[96c4102e2fe97684]::util::run_in_thread_pool_with_globals<rustc_interface[96c4102e2fe97684]::interface::run_compiler<(), rustdoc[5842327c84a5b3ea]::main_args::{closure#2}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[f94227772a84a350]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  54:     0x7f08f35e23ba - <std[40ec4738f960212f]::sys::thread::unix::Thread>::new::thread_start
  55:     0x7f08ece981b9 - <unknown>
  56:     0x7f08ecf1d21c - <unknown>
  57:                0x0 - <unknown>

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

note: please attach the file at `/home/matthias/vcs/github/CRED/rustc-ice-2026-07-10T10_23_50-1844952.txt` to your bug report

note: rustc 1.99.0-nightly (af3d95584 2026-07-09) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z next-solver=globally -Z normalize-docs

query stack during panic:
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    -Znormalize-docsUnstable rustdoc option: Normalize/evaluate types when generating docsC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions