summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/elided-lifetime-in-param-pat.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/lifetimes/elided-lifetime-in-param-pat.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/lifetimes/elided-lifetime-in-param-pat.rs b/src/test/ui/lifetimes/elided-lifetime-in-param-pat.rs
new file mode 100644
index 000000000..c1425fa42
--- /dev/null
+++ b/src/test/ui/lifetimes/elided-lifetime-in-param-pat.rs
@@ -0,0 +1,11 @@
+// check-pass
+
+struct S<T> {
+ _t: T,
+}
+
+fn f(S::<&i8> { .. }: S<&i8>) {}
+
+fn main() {
+ f(S { _t: &42_i8 });
+}