mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 16:45:37 +00:00
15 lines
410 B
Rust
15 lines
410 B
Rust
// Regression test for #87549.
|
|
// incremental
|
|
|
|
pub struct Table<T, const N: usize>([Option<T>; N]);
|
|
|
|
impl<'a, T, const N: usize> IntoIterator for &'a Table<T, N> {
|
|
type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>; //~ ERROR `&T` is not an iterator
|
|
type Item = &'a T;
|
|
|
|
fn into_iter(self) -> Self::IntoIter { //~ ERROR `&T` is not an iterator
|
|
unimplemented!()
|
|
}
|
|
}
|
|
fn main() {}
|