The Rust Programming Language Forum
Why does match keep temporary values in scope through arms?
help
ArifRoktim
November 24, 2020, 5:58am
5
Yandros adresses this in a link in that thread (
source
, emphasis not mine):
show post in topic
Related topics
Topic
Replies
Views
Activity
Variable scopes extend beyond the match expression
help
4
1311
October 30, 2020
Does "match" store values into a temporary variable before letting me access it?
help
6
614
February 2, 2024
Lifetime of variable in match pattern
help
5
685
October 5, 2022
Why is drop called after the match block?
12
2011
November 2, 2020
Drop semantics and temporary value lifetimes in while let
help
16
3893
August 3, 2019