summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-60218.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-60218.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-60218.rs b/src/test/ui/issues/issue-60218.rs
new file mode 100644
index 000000000..4926691f3
--- /dev/null
+++ b/src/test/ui/issues/issue-60218.rs
@@ -0,0 +1,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
+}