You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GCI: Reject free const items with trivially unsatisfiable clauses #165153
Not doing so would make adding trait impls (more) breaking. "More" because thanks to 1IR (the "one-impl rule") that's already breaking. Furthermore, const blocks inside fns with trivially unsatisfiable clauses are problematic in quite a similar fashion except that breakages would only ever be post-mono. Related: #165152.
Reproducer
Upstream crate upstream:
pubtraitTrait{constTHING:();}// NOTE: Adding this innocuous-looking impl would break downstream.//impl Trait for () { const THING: () = (); }
Downstream crate downstream:
#![feature(generic_const_items)]const _:() = {let _ = <()as upstream::Trait>::THING;panic!();// NOTE: Panics if upstream adds the impl}
where
for<'_delay> (): upstream::Trait;
changed the title [-]Reject free const items with trivially unsatisfiable clauses[/-][+]GCI: Reject free const items with trivially unsatisfiable clauses[/+]on Oct 29, 2026
Activity
[-]Reject free const items with trivially unsatisfiable clauses[/-][+]GCI: Reject free const items with trivially unsatisfiable clauses[/+]