From f42dbbdefc7984a782c17e3b9bbc0c258de1a997 Mon Sep 17 00:00:00 2001 From: Ralf Biedert Date: Fri, 1 Dec 2023 09:03:55 +0100 Subject: [PATCH] Mention temporary lifetimes in language sugar. --- content/_index.md | 1 + static/index.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/content/_index.md b/content/_index.md index fa6626c..5efefbc 100644 --- a/content/_index.md +++ b/content/_index.md @@ -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 []`. | diff --git a/static/index.js b/static/index.js index 230e64d..3a98276 100644 --- a/static/index.js +++ b/static/index.js @@ -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.", @@ -67,6 +67,7 @@ const subtitles = [ "Aquaaaariiiiiiiuuuuuuuuuuus", "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.", ];