
These operations are much more about lowering the HIR than about `Const`s themselves. They fit better in hir_ty_lowering with `lower_const_arg` (formerly `Const::from_const_arg`) and the rest. To accomplish this, `const_evaluatable_predicates_of` had to be changed to not use `from_anon_const` anymore. Instead of visiting the HIR and lowering anon consts on the fly, it now visits the `rustc_middle::ty` data structures instead and directly looks for `UnevaluatedConst`s. This approach was proposed in: https://github.com/rust-lang/rust/pull/131081#discussion_r1821189257
14 lines
281 B
Rust
14 lines
281 B
Rust
//@ known-bug: #121429
|
|
|
|
#![feature(generic_const_exprs)]
|
|
|
|
struct FixedI8<const X: usize>;
|
|
const FRAC_LHS: usize = 0;
|
|
const FRAC_RHS: usize = 1;
|
|
|
|
pub trait True {}
|
|
|
|
impl<const N: usize = { const { 3 } }> PartialEq<FixedI8<FRAC_RHS>> for FixedI8<FRAC_LHS> where
|
|
If<{}>: True
|
|
{
|
|
}
|