Skip to content

ICE: mGCA+GCI: Broken MIR: equate_normalized_input_or_output: NoSolution #151647

@fmease

Description

@fmease

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

No one assigned

    Labels

    C-bugCategory: This is a bug.F-generic_const_items`#![feature(generic_const_items)]`F-min_generic_const_args`#![feature(min_generic_const_args)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-mcveStatus: 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions