Skip to content

Commit ae70e36

Browse files
committed
Check that we do not ICE when anonymous lifetimes appear in AnonConst.
Fixes #98932.
1 parent 10be0dd commit ae70e36

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// check-pass
2+
// Verify that we do not ICE when anonymous lifetimes appear inside an AnonConst.
3+
4+
pub struct EntriesBuffer(Box<[[u8; HashesEntry::LEN]; 5]>);
5+
6+
impl EntriesBuffer {
7+
pub fn iter_child_buffers(&mut self) -> impl Iterator<Item = &mut [u8; HashesEntry::LEN]> {
8+
self.0.iter_mut()
9+
}
10+
11+
pub fn iter_child_buffers_explicit(
12+
&mut self,
13+
) -> impl Iterator<Item = &mut [u8; HashesEntry::<'_>::LEN]> {
14+
self.0.iter_mut()
15+
}
16+
}
17+
18+
pub struct HashesEntry<'a>(&'a [u8]);
19+
20+
impl HashesEntry<'_> {
21+
pub const LEN: usize = 1;
22+
}
23+
24+
fn main() {}

0 commit comments

Comments
 (0)