2021-08-06 09:36:54 +00:00
|
|
|
// Regression test for #87549.
|
2021-09-19 16:57:19 +00:00
|
|
|
//@ incremental
|
2021-08-06 09:36:54 +00:00
|
|
|
|
|
|
|
pub struct Table<T, const N: usize>([Option<T>; N]);
|
|
|
|
|
|
|
|
impl<'a, T, const N: usize> IntoIterator for &'a Table<T, N> {
|
2023-03-05 09:05:04 +00:00
|
|
|
type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>; //~ ERROR `&'a T` is not an iterator
|
2023-10-25 10:49:24 +00:00
|
|
|
//~^ ERROR `&'a T` is not an iterator
|
2021-08-06 09:36:54 +00:00
|
|
|
type Item = &'a T;
|
|
|
|
|
2023-03-05 09:05:04 +00:00
|
|
|
fn into_iter(self) -> Self::IntoIter { //~ ERROR `&'a T` is not an iterator
|
2021-08-06 09:36:54 +00:00
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fn main() {}
|