mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
20 lines
411 B
Rust
20 lines
411 B
Rust
|
// 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
|
||
|
}
|