]> git.lizzy.rs Git - rust.git/commitdiff
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)
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


Trivial merge