rust/tests/ui/issues/issue-60218.rs

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

20 lines
411 B
Rust
Raw Normal View History

2019-09-20 20:54:27 +00:00
// Regression test for #60218
//
// This was reported to cause ICEs.
use std::iter::Map;
pub trait Foo {}
pub fn trigger_error<I, F>(iterable: I, functor: F)
where
for<'t> &'t I: IntoIterator,
for<'t> Map<<&'t I as IntoIterator>::IntoIter, F>: Iterator,
for<'t> <Map<<&'t I as IntoIterator>::IntoIter, F> as Iterator>::Item: Foo,
{
}
fn main() {
trigger_error(vec![], |x: &u32| x) //~ ERROR E0277
}