ICE: `self.query_mode == TraitQueryMode::Canonical`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
auto-reduced (treereduce-rust):
#![feature(adt_const_params)]
use std::ops::Mul;
struct Quantity<S>(S);
impl<const D: usize, S> Mul<Quantity<<f32 as Mul<S>>::Output, D>> for f32
where
Quantity<<f32 as Mul<S>>::Output, D>:,
Quantity<Self::Output, D>:,
{
}
original:
use std::{ops::Mul};
struct Quantity<S, const D: usize>(S);
impl<const D: usize, S> Mul<Quantity<<f32 as Mul<S>>::Output, D>> for f32
where
Quantity<<f32 as Mul<S>>::Output, D>:,
Quantity<Self::Output, D>:
{
type Output = QuantityMul<S><f32 as Mul<S>>::Output, { D }>;
fn mul(self: rhs: Mul<S, D>) -> Self::Output {
Quantity(self * ops.0)
}
}
Version information
rustc 1.92.0-nightly (f43597208 2025-10-24)
binary: rustc
commit-hash: f435972085b697a1ece8ee6a1ac76efff8d1df7b
commit-date: 2025-10-24
host: x86_64-unknown-linux-gnu
release: 1.92.0-nightly
LLVM version: 21.1.3
Possibly related line of code:
https://github.com/rust-lang/rust/blob/f435972085b697a1ece8ee6a1ac76efff8d1df7b/compiler/rustc_trait_selection/src/traits/select/mod.rs#L257-L269
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zcrate-attr=feature(adt_const_params)
Program output
error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs:10:2
|
10 | }
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs`
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
--> /tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs:7:5
|
7 | Quantity<<f32 as Mul<S>>::Output, D>:,
| ^^^^^^^^ --- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
|
note: struct defined here, with 1 generic parameter: `S`
--> /tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs:3:8
|
3 | struct Quantity<S>(S);
| ^^^^^^^^ -
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
--> /tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs:8:5
|
8 | Quantity<Self::Output, D>:,
| ^^^^^^^^ --- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
|
note: struct defined here, with 1 generic parameter: `S`
--> /tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs:3:8
|
3 | struct Quantity<S>(S);
| ^^^^^^^^ -
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
--> /tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs:5:29
|
5 | impl<const D: usize, S> Mul<Quantity<<f32 as Mul<S>>::Output, D>> for f32
| ^^^^^^^^ --- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
|
note: struct defined here, with 1 generic parameter: `S`
--> /tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs:3:8
|
3 | struct Quantity<S>(S);
| ^^^^^^^^ -
error[E0046]: not all trait items implemented, missing: `Output`, `mul`
--> /tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs:5:1
|
5 | / impl<const D: usize, S> Mul<Quantity<<f32 as Mul<S>>::Output, D>> for f32
6 | | where
7 | | Quantity<<f32 as Mul<S>>::Output, D>:,
8 | | Quantity<Self::Output, D>:,
| |_______________________________^ missing `Output`, `mul` in implementation
|
= help: implement the missing item: `type Output = /* Type */;`
= help: implement the missing item: `fn mul(self, _: Quantity<<f32 as Mul<S>>::Output>) -> <Self as Mul<Quantity<<f32 as Mul<S>>::Output>>>::Output { todo!() }`
error[E0207]: the const parameter `D` is not constrained by the impl trait, self type, or predicates
--> /tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs:5:6
|
5 | impl<const D: usize, S> Mul<Quantity<<f32 as Mul<S>>::Output, D>> for f32
| ^^^^^^^^^^^^^^ unconstrained const parameter
|
= note: expressions using a const parameter must map each value to a distinct output value
= note: proving the result of expressions other than the parameter are unique is not supported
error[E0207]: the type parameter `S` is not constrained by the impl trait, self type, or predicates
--> /tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs:5:22
|
5 | impl<const D: usize, S> Mul<Quantity<<f32 as Mul<S>>::Output, D>> for f32
| ^ unconstrained type parameter
thread 'rustc' (4016509) panicked at compiler/rustc_trait_selection/src/traits/select/mod.rs:263:17:
assertion failed: self.query_mode == TraitQueryMode::Canonical
stack backtrace:
0: 0x7f5732634073 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h492c738ad49cea7d
1: 0x7f5732e01b98 - core::fmt::write::h1c21b4db123ae31c
2: 0x7f57325e8403 - std::io::Write::write_fmt::h78003e47d8f6c72e
3: 0x7f57325f9bf2 - std::sys::backtrace::BacktraceLock::print::h0d646c4d1cbf366e
4: 0x7f57325ffcc9 - std::panicking::default_hook::{{closure}}::h274ab31bbd3c2851
5: 0x7f57325ff7f3 - std::panicking::default_hook::he590f8320f1e009e
6: 0x7f5731600611 - std[3e186dc2068ac4b9]::panicking::update_hook::<alloc[47fc8f5871530046]::boxed::Box<rustc_driver_impl[b652d2bf07caa0d8]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x7f57326000ef - std::panicking::panic_with_hook::hc0910476a8aaf08a
8: 0x7f57325ffe76 - std::panicking::panic_handler::{{closure}}::hcd1800000a44a8b2
9: 0x7f57325f9d29 - std::sys::backtrace::__rust_end_short_backtrace::haf5c4fe241a5cbae
10: 0x7f57325da72d - __rustc[5048a257bccf4e4]::rust_begin_unwind
11: 0x7f572f604ad0 - core::panicking::panic_fmt::h624a4fef304b8bb6
12: 0x7f572f0d7cac - core::panicking::panic::h7f30ddb7de4e708c
13: 0x7f573304471c - rustc_trait_selection[cf51c7a433a87fce]::traits::project::normalize_projection_term
14: 0x7f5733039f1e - <rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[f23268db6eabe72c]::fold::TypeFolder<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::fold_ty
15: 0x7f5733037e5e - <rustc_middle[df80570e3f8f0476]::ty::Ty as rustc_type_ir[f23268db6eabe72c]::fold::TypeSuperFoldable<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::super_fold_with::<rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer>
16: 0x7f57334f2cd8 - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::confirm_candidate
17: 0x7f573303bf9d - rustc_trait_selection[cf51c7a433a87fce]::traits::project::normalize_projection_term
18: 0x7f5733039f1e - <rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[f23268db6eabe72c]::fold::TypeFolder<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::fold_ty
19: 0x7f573423fc8f - rustc_trait_selection[cf51c7a433a87fce]::traits::wf::obligations
20: 0x7f57334ec72d - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::evaluate_candidate::{closure#0}::{closure#0}
21: 0x7f5733550637 - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}
22: 0x7f573303bedc - rustc_trait_selection[cf51c7a433a87fce]::traits::project::normalize_projection_term
23: 0x7f5733039f1e - <rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[f23268db6eabe72c]::fold::TypeFolder<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::fold_ty
24: 0x7f5733037e5e - <rustc_middle[df80570e3f8f0476]::ty::Ty as rustc_type_ir[f23268db6eabe72c]::fold::TypeSuperFoldable<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::super_fold_with::<rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer>
25: 0x7f573304b057 - rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::normalize_with_depth::<rustc_type_ir[f23268db6eabe72c]::predicate::TraitRef<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>
26: 0x7f57335649fe - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::assemble_candidates
27: 0x7f573354e2e5 - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}
28: 0x7f573303bedc - rustc_trait_selection[cf51c7a433a87fce]::traits::project::normalize_projection_term
29: 0x7f5733039f1e - <rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[f23268db6eabe72c]::fold::TypeFolder<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::fold_ty
30: 0x7f5733037e5e - <rustc_middle[df80570e3f8f0476]::ty::Ty as rustc_type_ir[f23268db6eabe72c]::fold::TypeSuperFoldable<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::super_fold_with::<rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer>
31: 0x7f573304b057 - rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::normalize_with_depth::<rustc_type_ir[f23268db6eabe72c]::predicate::TraitRef<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>
32: 0x7f57335649fe - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::assemble_candidates
33: 0x7f573354e2e5 - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}
34: 0x7f573303bedc - rustc_trait_selection[cf51c7a433a87fce]::traits::project::normalize_projection_term
35: 0x7f5733039f1e - <rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[f23268db6eabe72c]::fold::TypeFolder<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::fold_ty
36: 0x7f5733037e5e - <rustc_middle[df80570e3f8f0476]::ty::Ty as rustc_type_ir[f23268db6eabe72c]::fold::TypeSuperFoldable<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::super_fold_with::<rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer>
37: 0x7f573304b057 - rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::normalize_with_depth::<rustc_type_ir[f23268db6eabe72c]::predicate::TraitRef<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>
38: 0x7f57335649fe - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::assemble_candidates
39: 0x7f573354e2e5 - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}
40: 0x7f573303bedc - rustc_trait_selection[cf51c7a433a87fce]::traits::project::normalize_projection_term
< snip >
749: 0x7f5733039f1e - <rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[f23268db6eabe72c]::fold::TypeFolder<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::fold_ty
750: 0x7f5733037e5e - <rustc_middle[df80570e3f8f0476]::ty::Ty as rustc_type_ir[f23268db6eabe72c]::fold::TypeSuperFoldable<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::super_fold_with::<rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer>
751: 0x7f573304b057 - rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::normalize_with_depth::<rustc_type_ir[f23268db6eabe72c]::predicate::TraitRef<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>
752: 0x7f57335649fe - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::assemble_candidates
753: 0x7f573354e2e5 - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}
754: 0x7f573303bedc - rustc_trait_selection[cf51c7a433a87fce]::traits::project::normalize_projection_term
755: 0x7f5733039f1e - <rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[f23268db6eabe72c]::fold::TypeFolder<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::fold_ty
756: 0x7f5733037e5e - <rustc_middle[df80570e3f8f0476]::ty::Ty as rustc_type_ir[f23268db6eabe72c]::fold::TypeSuperFoldable<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::super_fold_with::<rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer>
757: 0x7f573304b057 - rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::normalize_with_depth::<rustc_type_ir[f23268db6eabe72c]::predicate::TraitRef<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>
758: 0x7f57335649fe - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::assemble_candidates
759: 0x7f573354e2e5 - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}
760: 0x7f573303bedc - rustc_trait_selection[cf51c7a433a87fce]::traits::project::normalize_projection_term
761: 0x7f5733039f1e - <rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[f23268db6eabe72c]::fold::TypeFolder<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::fold_ty
762: 0x7f5733037e5e - <rustc_middle[df80570e3f8f0476]::ty::Ty as rustc_type_ir[f23268db6eabe72c]::fold::TypeSuperFoldable<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::super_fold_with::<rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer>
763: 0x7f573304b057 - rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::normalize_with_depth::<rustc_type_ir[f23268db6eabe72c]::predicate::TraitRef<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>
764: 0x7f57335649fe - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::assemble_candidates
765: 0x7f573354e2e5 - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}
766: 0x7f573303bedc - rustc_trait_selection[cf51c7a433a87fce]::traits::project::normalize_projection_term
767: 0x7f5733039f1e - <rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[f23268db6eabe72c]::fold::TypeFolder<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::fold_ty
768: 0x7f5733037e5e - <rustc_middle[df80570e3f8f0476]::ty::Ty as rustc_type_ir[f23268db6eabe72c]::fold::TypeSuperFoldable<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>::super_fold_with::<rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::AssocTypeNormalizer>
769: 0x7f573304b057 - rustc_trait_selection[cf51c7a433a87fce]::traits::normalize::normalize_with_depth::<rustc_type_ir[f23268db6eabe72c]::predicate::TraitRef<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt>>
770: 0x7f57335649fe - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::assemble_candidates
771: 0x7f573354e2e5 - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::candidate_from_obligation::{closure#0}
772: 0x7f5733515c3b - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::evaluate_trait_predicate_recursively
773: 0x7f57335210f5 - <rustc_trait_selection[cf51c7a433a87fce]::traits::select::SelectionContext>::evaluate_root_obligation
774: 0x7f573351f36f - rustc_traits[9abeb945000fd1a]::evaluate_obligation::evaluate_obligation
775: 0x7f573351eca9 - rustc_query_impl[ce892b7de41d33cc]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce892b7de41d33cc]::query_impl::evaluate_obligation::dynamic_query::{closure#2}::{closure#0}, rustc_middle[df80570e3f8f0476]::query::erase::Erased<[u8; 2usize]>>
776: 0x7f573351de88 - rustc_query_system[c36681704e76fc2e]::query::plumbing::try_execute_query::<rustc_query_impl[ce892b7de41d33cc]::DynamicConfig<rustc_query_system[c36681704e76fc2e]::query::caches::DefaultCache<rustc_type_ir[f23268db6eabe72c]::canonical::CanonicalQueryInput<rustc_middle[df80570e3f8f0476]::ty::context::TyCtxt, rustc_middle[df80570e3f8f0476]::ty::ParamEnvAnd<rustc_middle[df80570e3f8f0476]::ty::predicate::Predicate>>, rustc_middle[df80570e3f8f0476]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[ce892b7de41d33cc]::plumbing::QueryCtxt, false>
777: 0x7f573351dadd - rustc_query_impl[ce892b7de41d33cc]::query_impl::evaluate_obligation::get_query_non_incr::__rust_end_short_backtrace
778: 0x7f5733634c79 - <rustc_infer[f69987b619579eb]::infer::InferCtxt as rustc_trait_selection[cf51c7a433a87fce]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
779: 0x7f57324085b2 - <rustc_trait_selection[cf51c7a433a87fce]::error_reporting::TypeErrCtxt>::try_to_add_help_message
780: 0x7f57323f9a7a - <rustc_trait_selection[cf51c7a433a87fce]::error_reporting::TypeErrCtxt>::report_selection_error
781: 0x7f57324166bd - <rustc_trait_selection[cf51c7a433a87fce]::error_reporting::TypeErrCtxt>::report_fulfillment_errors
782: 0x7f57337ffab3 - <rustc_trait_selection[cf51c7a433a87fce]::traits::engine::ObligationCtxt<rustc_trait_selection[cf51c7a433a87fce]::traits::FulfillmentError>>::assumed_wf_types_and_report_errors
783: 0x7f57337a14f5 - rustc_hir_analysis[83592e86f71d95cd]::check::wfcheck::check_well_formed
784: 0x7f57337a091b - rustc_query_impl[ce892b7de41d33cc]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce892b7de41d33cc]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[df80570e3f8f0476]::query::erase::Erased<[u8; 1usize]>>
785: 0x7f57337a0192 - rustc_query_system[c36681704e76fc2e]::query::plumbing::try_execute_query::<rustc_query_impl[ce892b7de41d33cc]::DynamicConfig<rustc_data_structures[9e234764dc4c351e]::vec_cache::VecCache<rustc_span[b6aef8613cdfc213]::def_id::LocalDefId, rustc_middle[df80570e3f8f0476]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[c36681704e76fc2e]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[ce892b7de41d33cc]::plumbing::QueryCtxt, false>
786: 0x7f573379fc96 - rustc_query_impl[ce892b7de41d33cc]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
787: 0x7f573379d370 - rustc_hir_analysis[83592e86f71d95cd]::check::wfcheck::check_type_wf
788: 0x7f573379d265 - rustc_query_impl[ce892b7de41d33cc]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce892b7de41d33cc]::query_impl::check_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[df80570e3f8f0476]::query::erase::Erased<[u8; 1usize]>>
789: 0x7f5733ec6dd4 - rustc_query_system[c36681704e76fc2e]::query::plumbing::try_execute_query::<rustc_query_impl[ce892b7de41d33cc]::DynamicConfig<rustc_query_system[c36681704e76fc2e]::query::caches::SingleCache<rustc_middle[df80570e3f8f0476]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[ce892b7de41d33cc]::plumbing::QueryCtxt, false>
790: 0x7f5733ec6bb6 - rustc_query_impl[ce892b7de41d33cc]::query_impl::check_type_wf::get_query_non_incr::__rust_end_short_backtrace
791: 0x7f57338a507a - rustc_hir_analysis[83592e86f71d95cd]::check_crate
792: 0x7f57338cf770 - rustc_interface[10f842ee2745836b]::passes::analysis
793: 0x7f57338cf435 - rustc_query_impl[ce892b7de41d33cc]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ce892b7de41d33cc]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[df80570e3f8f0476]::query::erase::Erased<[u8; 0usize]>>
794: 0x7f5733ecd726 - rustc_query_system[c36681704e76fc2e]::query::plumbing::try_execute_query::<rustc_query_impl[ce892b7de41d33cc]::DynamicConfig<rustc_query_system[c36681704e76fc2e]::query::caches::SingleCache<rustc_middle[df80570e3f8f0476]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[ce892b7de41d33cc]::plumbing::QueryCtxt, false>
795: 0x7f5733ecd37c - rustc_query_impl[ce892b7de41d33cc]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
796: 0x7f573413ec8a - <rustc_interface[10f842ee2745836b]::passes::create_and_enter_global_ctxt<core[e8997f4232dfd718]::option::Option<rustc_interface[10f842ee2745836b]::queries::Linker>, rustc_driver_impl[b652d2bf07caa0d8]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[e8997f4232dfd718]::ops::function::FnOnce<(&rustc_session[4dec040bcdb04b8e]::session::Session, rustc_middle[df80570e3f8f0476]::ty::context::CurrentGcx, alloc[47fc8f5871530046]::sync::Arc<rustc_data_structures[9e234764dc4c351e]::jobserver::Proxy>, &std[3e186dc2068ac4b9]::sync::once_lock::OnceLock<rustc_middle[df80570e3f8f0476]::ty::context::GlobalCtxt>, &rustc_data_structures[9e234764dc4c351e]::sync::worker_local::WorkerLocal<rustc_middle[df80570e3f8f0476]::arena::Arena>, &rustc_data_structures[9e234764dc4c351e]::sync::worker_local::WorkerLocal<rustc_hir[739a0293ab2ba12c]::Arena>, rustc_driver_impl[b652d2bf07caa0d8]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
797: 0x7f5733fb37e2 - rustc_interface[10f842ee2745836b]::interface::run_compiler::<(), rustc_driver_impl[b652d2bf07caa0d8]::run_compiler::{closure#0}>::{closure#1}
798: 0x7f5733bc09c0 - std[3e186dc2068ac4b9]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[10f842ee2745836b]::util::run_in_thread_with_globals<rustc_interface[10f842ee2745836b]::util::run_in_thread_pool_with_globals<rustc_interface[10f842ee2745836b]::interface::run_compiler<(), rustc_driver_impl[b652d2bf07caa0d8]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
799: 0x7f5733bc06a4 - <<std[3e186dc2068ac4b9]::thread::Builder>::spawn_unchecked_<rustc_interface[10f842ee2745836b]::util::run_in_thread_with_globals<rustc_interface[10f842ee2745836b]::util::run_in_thread_pool_with_globals<rustc_interface[10f842ee2745836b]::interface::run_compiler<(), rustc_driver_impl[b652d2bf07caa0d8]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[e8997f4232dfd718]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
800: 0x7f5733bbf02f - std::sys::thread::unix::Thread::new::thread_start::h69c86f976e686da7
801: 0x7f572d6969cb - <unknown>
802: 0x7f572d71aa0c - <unknown>
803: 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-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: rustc 1.92.0-nightly (f43597208 2025-10-24) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z crate-attr=feature(adt_const_params) -Z dump-mir-dir=dir
query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `f32: core::ops::arith::Mul<^c_0>`
#1 [check_well_formed] checking that `<impl at /tmp/icemaker_global_tempdir.20BLeJTxFmM8/rustc_testrunner_tmpdir_reporting.wjd045mo8fpA/mvce.rs:5:1: 8:32>` is well-formed
#2 [check_type_wf] checking that types are well-formed
#3 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 7 previous errors
Some errors have detailed explanations: E0046, E0107, E0207, E0601.
For more information about an error, try `rustc --explain E0046`.
@rustbot label +F-adt_const_params
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reduced reproducer and run the listed rustc command using the reported nightly version. Inspect compiler/rustc_trait_selection/src/traits/select/mod.rs around lines 257-269, then trace the trait projection and normalization paths shown in the backtrace. Done means the reproducer reports diagnostics without triggering the TraitQueryMode::Canonical assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100