Lifetime generics on Generic Const Items should not affect if const is checked for evaluatability #136204
Labels
C-bug
Category: This is a bug.
F-generic_const_items
`#![feature(generic_const_items)]`
T-types
Relevant to the types team, which will review and decide on the PR/issue.
This seems inconsistent, and pretty bad. But luckily something we can change before stabilizing generic consts :)
I think we should probably change the code introduced in #121387 to instead call
requires_monomorphization
instead ofis_empty
on the generics.It should also preferably check for impossible predicates in the same way we do for
-Clink-dead-code
/-Zcollect-mono-items=eager
, since we must avoid monomorphizing consts with impossible (possibly trivial) preds. You could probably turn that into an ICE today.Originally posted by @compiler-errors in #136168 (review)
The text was updated successfully, but these errors were encountered: