diff options
| author | bors <bors@rust-lang.org> | 2018-07-22 23:05:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-22 23:05:11 +0000 |
| commit | 67f9c71e4547b9892b2f6ed68c34fb9d0f00c9d1 (patch) | |
| tree | 9be05f772aa2ff744c0995a7d6c976619162d771 /src/libsyntax/parse/parser.rs | |
| parent | ffaf3d2567c18abdaaac689776105fc99aaa36a3 (diff) | |
| parent | f153be6258f24155756298b3a79e9b14df7afe00 (diff) | |
| download | rust-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
