Closed
Description
#![feature(const_generics)]
#![feature(const_evaluatable_checked)]
struct Buffer<T, const S: usize>
where
[(); {S * 2}]: Default,
{
data: [T; {S * 2}],
}
struct BufferIter<'a, T, const S: usize>(&'a Buffer<T, S>)
where
[(); {S * 2}]: Default;
impl<'a, T, const S: usize> Iterator for BufferIter<'a, T, S> {
type Item = &'a T;
fn next(&mut self) -> Option<Self::Item> {
None
}
}
Compiler panics
error: internal compiler error: compiler/rustc_middle/src/ich/impls_ty.rs:94:17: StableHasher: unexpected region '_#0r
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1115:9
It's the iterator impl that's causing it.
rustc 1.56.0-nightly (0fa319039 2021-08-12)
compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin