rust/tests/ui/wf/hir-wf-check-erase-regions.rs
Matthew Jasper 87e5969572 Update tests for dropck normalization errors
Takes crash tests from #135039, #103899, #91985 and #105299 and turns them into ui tests
2025-02-17 11:33:07 +00:00

18 lines
511 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 `&'a T` is not an iterator
//~^ ERROR `&'a T` is not an iterator
type Item = &'a T;
fn into_iter(self) -> Self::IntoIter {
//~^ ERROR `&'a T` is not an iterator
//~| ERROR `&T` is not an iterator
unimplemented!()
}
}
fn main() {}