If let chains and temporary scopes

⚓ Rust    📅 2025-06-28    👤 surdeus    👁️ 8      

surdeus

Warning

This post was published 42 days ago. The information described in this article may have changed.

Hey folks,

I've seen that let chains are since 1.88.0 on stable which is pretty cool, but there is something that I don't quite understand: On the blog they say that this new feature depends on the temporary scope changes that have been made with 2024 Edition and they're linking to the page in the docs where you can see that temporaries for if let expressions are dropped now before the else branch. I try to understand why that's necessary for let chains but I'm not getting it. Could anybody help me out please? I really want to understand it.

Regards
keks

1 post - 1 participant

Read full topic

🏷️ rust_feed