]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #34355 - jseyfried:paren_expression_ids_nonunique, r=nrc
authorManish Goregaokar <manishsmail@gmail.com>
Wed, 29 Jun 2016 15:51:21 +0000 (21:21 +0530)
committerGitHub <noreply@github.com>
Wed, 29 Jun 2016 15:51:21 +0000 (21:21 +0530)
commitf74d0fb568936b75120094b25a5638c1fc49c51e
tree2074531ad3334163fb1a80e31668e48fea747aa8
parent366de839ae9794411419c5b579c829e18adde613
parent8557a2e18c755ef269aa54b067cfc323e97d9a11
Rollup merge of #34355 - jseyfried:paren_expression_ids_nonunique, r=nrc

Give `ast::ExprKind::Paren` no-op expressions the same ids as their children.

Having `ast::ExprKind::Paren` expressions share ids with their children
 - reduces the number of unused `NodeId`s in the hir map and
 - guarantees that `tcx.map.expect_expr(ast_expr.id)` is the hir corresponding to `ast_expr`.

This fixes the bug from #34327, which was introduced in #33296 when I assumed the above guarantee.

r? @nrc