Skip to content

Commit

Permalink
Mention temporary lifetimes in language sugar.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfbiedert committed Dec 1, 2023
1 parent 90d54b0 commit f42dbbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ If something works that "shouldn't work now that you think about it", it might b
| **Prelude** {{ std(page="std/prelude/index.html") }} | Automatic import of basic items, e.g., `Option`, `drop()`, …
| **Reborrow** {{ link(url="https://quinedot.github.io/rust-learning/st-reborrow.html") }} | Since `x: &mut T` can't be copied; moves new `&mut *x` instead. |
| **Lifetime Elision** {{ book(page="ch10-03-lifetime-syntax.html#lifetime-elision") }} {{ nom(page="lifetime-elision.html#lifetime-elision") }} {{ ref(page="lifetime-elision.html#lifetime-elision") }} | Allows you to write `f(x: &T)`, instead of `f<'a>(x: &'a T)`, for brevity. |
| **Lifetime Extensions** {{ link(url="https://blog.m-ou.se/super-let/") }} {{ ref(page="destructors.html#temporary-lifetime-extension") }} | In `let x = &tmp().f` and similar hold on to temporary past line. |
| **Method Resolution** {{ ref(page="expressions/method-call-expr.html") }} | Derefs or borrow `x` until `x.f()` works. |
| **Match Ergonomics** {{ rfc(page="2005-match-ergonomics.html") }} | Repeatedly deref. [scrutinee](https://doc.rust-lang.org/stable/reference/glossary.html#scrutinee) and adds `ref` and `ref mut` to bindings. |
| **Rvalue Static Promotion** {{ rfc(page="1414-rvalue_static_promotion.html") }} {{ esoteric() }} | Makes refs. to constants `'static`, e.g., `&42`, `&None`, `&mut []`. |
Expand Down
3 changes: 2 additions & 1 deletion static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const subtitles = [
"As seen on interdimensional cable.",
"I'm sure there's an X-File on the never type.",
"${jndi:ldap://rustup.rs}",
"An amorphous guide to fractal complexity.",
"A fractal guide to amorphous complexity.",
"Roses did rust before it was cool.",
"Blazingly fa... 🤚😣",
"The sheet that really ties the room together.",
Expand All @@ -67,6 +67,7 @@ const subtitles = [
"Aquaaaa<sup>riiiiiii<sup style='font-size:85%;'>uuuuuuuuuuus</sup></sup>",
"Rust is fast, somewhere between a snake and a mongoose.",
"\"In the jungle, the mighty jungle, the lion sleeps tonight\" ... Chorus: \"Async-await, async-await ...\"",
"The 3.6 roentgen cheat sheet.",
];


Expand Down

0 comments on commit f42dbbd

Please sign in to comment.