We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4499d4 commit 548e765Copy full SHA for 548e765
README.md
@@ -11,3 +11,4 @@ in a controlled repository now.
11
* `strings.rs`: string and str examples
12
* `iterators.rs`: iterator examples
13
* `closures.rs`: closure examples
14
+* `lifetimes.rs`: simple lifetime example
lifetimes.rs
@@ -0,0 +1,8 @@
1
+fn call_me() -> &'static u64 {
2
+ let y = 5;
3
+ return &y;
4
+}
5
+
6
+fn main() {
7
+ println!("{}", call_me());
8
0 commit comments