We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 727fc30 + e1d6abb commit 0e7de2eCopy full SHA for 0e7de2e
info.toml
@@ -795,7 +795,10 @@ name = "lifetimes2"
795
path = "exercises/lifetimes/lifetimes2.rs"
796
mode = "compile"
797
hint = """
798
-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.
799
+You can take at least two paths to achieve the desired result while keeping the inner block:
800
+1. Move the string2 declaration to make it live as long as string1 (how is result declared?)
801
+2. Move println! into the inner block"""
802
803
[[exercises]]
804
name = "lifetimes3"
0 commit comments