-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE+errors: associated_const_equality: normalize_erasing_regions.rs: Failed to normalize Alias(Projection, _) #141489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment has been minimized.
This comment has been minimized.
Actually, hold on, this is a completely different error.. So we went from compiling to an ICE to a different ICE in a matter of week.
The new errors are all seem to be exampleerror[E0308]: method not compatible with trait
--> src\lib.rs:897:13
|
897 | ... fn get_internals(&self) -> (&Internals<<P as real_time_fir_iir_filters::param::FilterParam>::F>, &real_time_fir_iir_filters::param::Param<P>)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `$sos*($sos >= 1) as usize - ($sos >= 1) as usize`, found `$sos*($sos >= 1) as usize - ($sos >= 1) as usize`
|
::: src\filters\iir\fourth\wah_filter.rs:4:1
|
4 | / crate::def_rtf!(
5 | | {
6 | | /// # Configuration
7 | | ///
... |
68 | | );
| |_- in this macro invocation
|
= note: expected constant `$sos*($sos >= 1) as usize - ($sos >= 1) as usize`
found constant `$sos*($sos >= 1) as usize - ($sos >= 1) as usize`
= note: this error originates in the macro `crate::def_rtf` (in Nightly builds, run with -Z macro-backtrace for more info) Note that the minimization in the above comment is not for the ICE in the OP but rather for a different one. So we still need a new mcve. |
reduced again, this time for the correct ICE.. #![feature(associated_const_equality)]
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
pub struct Omega<F, const ORDER: usize = 0> {
pub omega: F,
}
pub trait ChebyshevFilterParamBase<C> {
const TYPE: bool;
}
pub trait ButterworthFilterParam<C>: ChebyshevFilterParamBase<C, TYPE = false> {
type Conf
where
[(); Self::ORDER]:;
}
impl<F, C, const ORDER: usize> ChebyshevFilterParamBase<C> for Omega<F, ORDER> {
const TYPE: bool = false;
}
impl<F, C, const ORDER: usize> ButterworthFilterParam<C> for Omega<F, ORDER> {
type Conf = C;
}
pub trait DynOrderButterworthFilterParam<C> {
type Conf;
}
impl<P, C> DynOrderButterworthFilterParam<C> for P {
type Conf = <Self as ButterworthFilterParam<C>>::Conf;
}
pub trait EllipticFilterConfFinal {}
impl<C> EllipticFilterConfFinal for C where Omega<()>: DynOrderButterworthFilterParam<C, Conf = C> {}
pub trait EllipticFilterConf {
type Conf: EllipticFilterConfFinal;
} @rustbot label: +F-generic_const_exprs +requires-incomplete-features Late edit (and I sincerely apologize for the noise): Here's a more faithful reduction, that's error-minimized and successfully builds on older nightlies: although it's a bit chunkier#![feature(associated_const_equality)]
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
pub trait FilterParam {
const ORDER: usize = 0;
type F;
}
pub trait ChebyshevFilterParamBase<C>: FilterParam {
const TYPE: bool;
}
pub trait ButterworthFilterParam<C>: ChebyshevFilterParamBase<C, TYPE = false>
{
type Conf
where
[(); Self::ORDER]: ;
}
pub trait DynOrderButterworthFilterParam<C>
{
type Conf;
}
impl<P, C> DynOrderButterworthFilterParam<C> for P
where
P: ButterworthFilterParam<C>,
[(); Self::ORDER]: {
type Conf = <Self as ButterworthFilterParam<C>>::Conf;
}
pub trait Conf: Sized { }
pub trait ButterworthFilterConf<const ORDER: usize>: Conf {
type Conf: ;
const OUTPUTS: usize;
}
impl<C, const OUTPUTS: usize> ButterworthFilterConf<0> for C
where
C: EllipticFilterConf<OUTPUTS = {
OUTPUTS
}> {
type Conf = <Self as EllipticFilterConf>::Conf;
const OUTPUTS: usize = OUTPUTS;
}
pub trait EllipticFilterConf: Conf {
type Conf: EllipticFilterConfFinal;
const OUTPUTS: usize;
}
pub trait EllipticFilterConfFinal: EllipticFilterConf<Conf = Self> { }
impl<CC> EllipticFilterConfFinal for CC
where
CC: EllipticFilterConf<Conf = CC>,
Omega<f32>: DynOrderButterworthFilterParam<CC, Conf = CC> { }
pub struct Omega<F = f32, const ORDER: usize = 0> {
pub omega: F,
}
impl<F> FilterParam for Omega<F, 0> {
type F = F;
}
impl<F, C> ChebyshevFilterParamBase<C> for Omega<F, 0> {
const TYPE: bool = false;
}
impl<F, C> ButterworthFilterParam<C> for Omega<F, 0>
where
C: ButterworthFilterConf<{
Self::ORDER
}> {
type Conf = C;
} |
Unknown labels: regression-from-nightly-to-nightly |
Uh oh!
There was an error while loading. Please reload this page.
This is a regression that happened after updating the rust nightly toolchain today to version 3e674b0 2025-05-23. Suddenly, the compiler is not able to reason with associated const equality at all, and i get a rust-ICE that fails checking if an associated type is well formed.
Code
real_time_fir_iir_filters
as of commit687912d
: sigurd4/real_time_fir_iir_filters@687912dMeta
rustc --version --verbose
:Error output
Backtrace
I can't compile, so i can't see any backtrace for my code.
The text was updated successfully, but these errors were encountered: