summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-60218.rs
blob: 4926691f3b568134a82054a31a7ec111b0c3e8f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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
}