-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE with associated_const_equality
#108220
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-associated_const_equality
`#![feature(associated_const_equality)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Minimal example: #![feature(associated_const_equality)]
#![no_std]
use core::marker::PhantomData;
pub struct NoPin;
pub trait SetAlternate<const A: u8> {}
impl SetAlternate<0> for NoPin {}
pub trait PinA<PER> {
const A: u8;
}
impl<PER> PinA<PER> for NoPin {
const A: u8 = 0;
}
pub trait Pins<USART> {}
impl<USART, T, const TA: u8> Pins<USART> for T where
T: PinA<USART, A = { TA }> + SetAlternate<TA>
{
}
struct Serial<USART>(PhantomData<USART>);
impl<USART> Serial<USART> where NoPin: Pins<USART> {} Error output
|
Seems that this no longer crashes as is |
reopened until test is added |
Merged
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Mar 25, 2024
add even more tests! Fixes rust-lang#109869 Fixes rust-lang#110453 Fixes rust-lang#109020 Fixes rust-lang#108580 Fixes rust-lang#108220 Fixes rust-lang#113045 Fixes rust-lang#113133 Fixes rust-lang#114464 Fixes rust-lang#116599 Fixes rust-lang#119731
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 25, 2024
Rollup merge of rust-lang#122988 - matthiaskrgr:icetests, r=petrochenkov add even more tests! Fixes rust-lang#109869 Fixes rust-lang#110453 Fixes rust-lang#109020 Fixes rust-lang#108580 Fixes rust-lang#108220 Fixes rust-lang#113045 Fixes rust-lang#113133 Fixes rust-lang#114464 Fixes rust-lang#116599 Fixes rust-lang#119731
nvm not worth reopening this one |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-associated_const_equality
`#![feature(associated_const_equality)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Trying to remove
struct Const<const A: u8>
workaround I get this ICE.stm32-rs/stm32f4xx-hal@2f50fd5
Related to #92827
Note. There is
thumbv7em-none-eabihf
target used.Code
I could not get minimal reprodusable example.
<code>
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: