about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-22 23:05:11 +0000
committerbors <bors@rust-lang.org>2018-07-22 23:05:11 +0000
commit67f9c71e4547b9892b2f6ed68c34fb9d0f00c9d1 (patch)
tree9be05f772aa2ff744c0995a7d6c976619162d771 /src/libsyntax/parse/parser.rs
parentffaf3d2567c18abdaaac689776105fc99aaa36a3 (diff)
parentf153be6258f24155756298b3a79e9b14df7afe00 (diff)
downloadrust-67f9c71e4547b9892b2f6ed68c34fb9d0f00c9d1.tar.gz
rust-67f9c71e4547b9892b2f6ed68c34fb9d0f00c9d1.zip
Auto merge of #52564 - pnkfelix:issue-52126-lhs-of-assign-op-is-invariant, r=eddyb
LHS of assign op is invariant

This addresses a bug injected by #45435. That PR changed the way we type-check `LHS <op> RHS` to coerce the LHS to the expected supertype in much the same way that we coerce the RHS.

The problem is that when we have a case of `LHS <op>= RHS`, we do not want to coerce to a supertype; we need the type to remain invariant. Otherwise we risk leaking a value with short-lifetimes into a expression context that needs to satisfy a long lifetime.

Fix #52126
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
0 files changed, 0 insertions, 0 deletions