summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rust-2018/issue-51008.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/rust-2018/issue-51008.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/rust-2018/issue-51008.rs b/src/test/ui/rust-2018/issue-51008.rs
new file mode 100644
index 000000000..b62609e32
--- /dev/null
+++ b/src/test/ui/rust-2018/issue-51008.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: FnOnce(&i32) {}
+
+fn main() {}