rust-lang/rust — pull request #19370 by Aatch (2014-11-28 03:35:36+00:00)
Title: Fix corner case in `expr_kind`

It looks like the expression isn't getting an entry in the `node_types` map, meaning that when it checks the type of the expression in `expr_kind` to see if it should use `RvalueDatumExpr` or `RvalueDpsExpr`, it cant find the type and panics.

As far as I can tell, this only comes up in this case shown in issue #19337, a unit struct on the left-hand side of an assignment expression. The only reason this happens is because a `DefStruct` is the only case where `expr_kind` checks the type of the expression, so falling back to `RvalueDpsExpr` when no type is found should be fine.

Fixes #19337