rust/tests/ui/lint/ice-array-into-iter-lint-issue-121532.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
337 B
Rust
Raw Normal View History

// Regression test for #121532
// Checks the we don't ICE in ArrayIntoIter
// lint when typeck has failed
// Typeck fails for the arg type as
// `Self` makes no sense here
fn func(a: Self::ItemsIterator) { //~ ERROR failed to resolve: `Self` is only available in impls, traits, and type definitions
a.into_iter();
}
fn main() {}