-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-generic_const_items`#![feature(generic_const_items)]``#![feature(generic_const_items)]`F-generic_const_parameter_types`#![feature(generic_const_parameter_types)]``#![feature(generic_const_parameter_types)]`F-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`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.
Description
Found while investigating an unrelated mGCA issue.
#![feature(generic_const_items, min_generic_const_args, generic_const_parameter_types)]
#[type_const]
const Q<'a, T: 'a + ?Sized>: usize = { <T as Fit>::N };
trait Fit { #[type_const] const N: usize; }
impl<T: ?Sized> Fit for T { #[type_const] const N: usize = 0; }
fn h(x: [(); Q::<'static, ()>]) {}
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:12 ~ ice[b040]::h) (bb0[0]): equate_normalized_input_or_output: `[(); UnevaluatedConst { def: DefId(0:7 ~ ice[b040]::Fit::N), args: [()] }]==[(); 0_usize]` failed with `NoSolution`
--> ice.rs:9:35
|
9 | fn h(x: [(); Q::<'static, ()>]) {}
| ^
|
note: delayed at /rustc-dev/39052daf937d46373ac29778e1b8853c52c0cc25/compiler/rustc_borrowck/src/type_check/input_output.rs:199:17 - disabled backtrace
--> ice.rs:9:35
|
9 | fn h(x: [(); Q::<'static, ()>]) {}
| ^
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
query stack during panic:
end of query stack
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-generic_const_items`#![feature(generic_const_items)]``#![feature(generic_const_items)]`F-generic_const_parameter_types`#![feature(generic_const_parameter_types)]``#![feature(generic_const_parameter_types)]`F-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`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.