summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTostapunk <s.mattia2000@gmail.com>2022-07-18 14:11:51 +0200
committerTostapunk <s.mattia2000@gmail.com>2022-07-18 14:11:51 +0200
commit02d78c3e84c8f160b6f6487be0a368b5720bb67b (patch)
treeb5145e4b5fbe7a589ce6a14002b5696f477246ab
parent7035d6787cd551ece7d582d052685c52875a6a72 (diff)
fix: Improve hint of lifetimes2
fixes #1071
-rw-r--r--info.toml5
1 files changed, 4 insertions, 1 deletions
diff --git a/info.toml b/info.toml
index 5b7b9b4..3ec15d7 100644
--- a/info.toml
+++ b/info.toml
@@ -795,7 +795,10 @@ name = "lifetimes2"
path = "exercises/lifetimes/lifetimes2.rs"
mode = "compile"
hint = """
-What is the compiler checking? How could you change how long an owned variable lives?"""
+Remember that the generic lifetime 'a will get the concrete lifetime that is equal to the smaller of the lifetimes of x and y.
+You can take at leats two paths to achieve the desidered result while keeping the inner block:
+1. move string2 declaration to make it live as long as string1 (how is result declared?)
+2. move println! into the inner block"""
[[exercises]]
name = "lifetimes3"