summaryrefslogtreecommitdiffstats
path: root/tests/ui/rust-2018/issue-51008-1.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rust-2018/issue-51008-1.rs')
-rw-r--r--tests/ui/rust-2018/issue-51008-1.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/rust-2018/issue-51008-1.rs b/tests/ui/rust-2018/issue-51008-1.rs
new file mode 100644
index 000000000..8ae5e8278
--- /dev/null
+++ b/tests/ui/rust-2018/issue-51008-1.rs
@@ -0,0 +1,15 @@
+// Regression test for #51008 -- the anonymous lifetime in `&i32` was
+// being incorrectly considered part of the "elided lifetimes" from
+// the impl.
+//
+// run-pass
+
+#![feature(rust_2018_preview)]
+
+trait A {
+
+}
+
+impl<F> A for F where F: PartialEq<fn(&i32)> { }
+
+fn main() {}