summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs')
-rw-r--r--src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs b/src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs
new file mode 100644
index 000000000..6301ac4a3
--- /dev/null
+++ b/src/test/ui/impl-header-lifetime-elision/explicit-and-elided-same-header.rs
@@ -0,0 +1,13 @@
+// run-pass
+
+#![allow(warnings)]
+
+// This works for functions...
+fn foo<'a>(x: &str, y: &'a str) {}
+
+// ...so this should work for impls
+impl<'a> Foo<&str> for &'a str {}
+trait Foo<T> {}
+
+fn main() {
+}