Why isn't this rvalue promoted to an lvalue as specified in the reference?
问题 The Rust Reference says: The left operand of an assignment or compound-assignment expression is an lvalue context, as is the single operand of a unary borrow. [...] When an rvalue is used in an lvalue context, a temporary un-named lvalue is created and used instead. This rvalue promotion obviously works with borrowing: let ref_to_i32 = &27; // a temporary i32 variable with value 27 is created But it doesn't seem to work in an assignment (although the reference speaks about all lvalue contexts