Okay, I see. The issue you are running into is specifically mentioned in this article about how Rust currently does lifetime extension:
https://smallcultfollowing.com/babysteps/blog/2023/03/15/tem...
Typically, a temporary's lifetime is bounded by the statement it is in, but for the subject of a match, this extension overlaps with all its arms even if the temporary borrow is not used after the subject is evaluated (i.e. you borrowed, you read and copied a field out of the borrow).
The issue seems to be that this is a syntactic transformation, but the expected behaviour requires type information, so you can tell whether to extend the temporary's lifetime by whether that lifetime leaks the immediately containing scope.
This is kind of similar to how type parameter unification in Hindley-Milner works. There's even an analogy made between the two things here:
https://okmij.org/ftp/ML/generalization.html#gen-mismanageme...