summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/lifetimes2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/lifetimes2.rs')
-rw-r--r--tests/ui/impl-trait/lifetimes2.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/lifetimes2.rs b/tests/ui/impl-trait/lifetimes2.rs
new file mode 100644
index 000000000..834f2dc6c
--- /dev/null
+++ b/tests/ui/impl-trait/lifetimes2.rs
@@ -0,0 +1,10 @@
+// check-pass
+
+pub fn keys<'a>(x: &'a Result<u32, u32>) -> impl std::fmt::Debug + 'a {
+ match x {
+ Ok(map) => Ok(map),
+ Err(map) => Err(map),
+ }
+}
+
+fn main() {}