Repository navigation
Closed
Closed
Copy link
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-gca_min_const_items`#![feature(gca_min_const_items)]` (previously: `min_generic_const_args`)`#![feature(gca_min_const_items)]` (previously: `min_generic_const_args`)F-generic_const_items`#![feature(generic_const_items)]``#![feature(generic_const_items)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-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.
Description
Found while investigating an unrelated mGCA issue.
#![feature(generic_const_items, min_generic_const_args)]
#[type_const]
const CT<T: ?Sized>: usize = { <T as Trait>::N };
trait Trait { #[type_const] const N: usize; }
impl<T: ?Sized> Trait for T { #[type_const] const N: usize = 0; }
fn f(x: [(); CT::<()>]) {}
trait Bound {}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: broken MIR in DefId(0:11 ~ t[36dd]::f) (bb0[0]): equate_normalized_input_or_output: `[(); UnevaluatedConst { def: DefId(0:6 ~ t[36dd]::Trait::N), args: [()] }]==[(); 0_usize]` failed with `NoSolution`
--> t.rs:15:27
|
15 | fn f(x: [(); CT::<()>]) {}
| ^
|
note: delayed at /rustc-dev/39052daf937d46373ac29778e1b8853c52c0cc25/compiler/rustc_borrowck/src/type_check/input_output.rs:199:17 - disabled backtrace
--> t.rs:15:27
|
15 | fn f(x: [(); CT::<()>]) {}
| ^
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.95.0-nightly (39052daf9 2026-01-22) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -Z unstable-options
query stack during panic:
end of query stack
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-gca_min_const_items`#![feature(gca_min_const_items)]` (previously: `min_generic_const_args`)`#![feature(gca_min_const_items)]` (previously: `min_generic_const_args`)F-generic_const_items`#![feature(generic_const_items)]``#![feature(generic_const_items)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-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.
Activity
fmease commentedon Jan 25, 2026
Passes if the following is applied:
[-]ICE: mGCA+GCPT+GCI: Broken MIR: NoSolution[/-][+]ICE: mGCA+GCPT+GCI: Broken MIR: equate_normalized_input_or_output: NoSolution[/+][-]ICE: mGCA+GCPT+GCI: Broken MIR: equate_normalized_input_or_output: NoSolution[/-][+]ICE: mGCA+GCI: Broken MIR: equate_normalized_input_or_output: NoSolution[/+]BoxyUwU commentedon Jan 27, 2026
doesn;t need GCPTs. Seems like we're not properly fully normalizing consts in one of the many folders/normalization impls 🤔
Rollup merge of rust-lang#152278 - lapla-cogito:type_const_nested, r=…
Rollup merge of rust-lang#152278 - lapla-cogito:type_const_nested, r=…
Rollup merge of rust-lang#152278 - lapla-cogito:type_const_nested, r=…
Rollup merge of rust-lang#152278 - lapla-cogito:type_const_nested, r=…
Unrolled build for #152278