summaryrefslogtreecommitdiff
path: root/info.toml
diff options
context:
space:
mode:
authorliv <mokou@fastmail.com>2022-07-18 16:06:16 +0200
committerGitHub <noreply@github.com>2022-07-18 16:06:16 +0200
commit0e7de2e7a7726d0542745c70cb8659d6dca847a4 (patch)
tree7c5b8ac5ae0f59dc0b83413de5094cb9bab000f5 /info.toml
parent727fc3037cefcbc1f0ce21079f423631d211c404 (diff)
parente1d6abb4c919386fd5c728a30db73d160c6fe373 (diff)
Merge pull request #1079 from Tostapunk/fix/lifetimes-patch1
fix: Improve hint of lifetimes2
Diffstat (limited to 'info.toml')
-rw-r--r--info.toml5
1 files changed, 4 insertions, 1 deletions
diff --git a/info.toml b/info.toml
index 5b7b9b4..0be3e91 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 least two paths to achieve the desired result while keeping the inner block:
+1. Move the string2 declaration to make it live as long as string1 (how is result declared?)
+2. Move println! into the inner block"""
[[exercises]]
name = "lifetimes3"