diff --git a/text/3606-temporary-lifetimes-in-tail-expressions.md b/text/3606-temporary-lifetimes-in-tail-expressions.md index 9a26fc956f4..1fc5a725d42 100644 --- a/text/3606-temporary-lifetimes-in-tail-expressions.md +++ b/text/3606-temporary-lifetimes-in-tail-expressions.md @@ -13,7 +13,7 @@ In the next edition, drop temporaries in tail expressions *before* dropping loca and a visualisation of how long x and temp live before and after this change. Before: x is created first, then temp is created, then x is dropped, then temp is dropped. After: x is created first, then temp is created, then temp is dropped, then x is dropped. -](https://github.com/rust-lang/rfcs/assets/783247/07adb0c3-af0a-4761-a696-9bddd0b75c62) +](3606-temporary-lifetimes-in-tail-expressions/diagram.svg) # Motivation diff --git a/text/3606-temporary-lifetimes-in-tail-expressions/diagram.svg b/text/3606-temporary-lifetimes-in-tail-expressions/diagram.svg new file mode 100644 index 00000000000..33d72faad94 --- /dev/null +++ b/text/3606-temporary-lifetimes-in-tail-expressions/diagram.svg @@ -0,0 +1,4 @@ + + + +
let x
temp()
drop
drop
let x
temp()
drop
drop
before
after
fn f() {
    let x = g();

    temp().h()
}
\ No newline at end of file