]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #105343 - nbdd0121:hir, r=fee1-dead
authorMatthias Krüger <matthias.krueger@famsik.de>
Wed, 7 Dec 2022 14:39:07 +0000 (15:39 +0100)
committerGitHub <noreply@github.com>
Wed, 7 Dec 2022 14:39:07 +0000 (15:39 +0100)
Simplify attribute handling in rustc_ast_lowering

Given that attributes is stored in a separate BTreeMap, it's not necessary to pass it in when constructing `hir::Expr`. We can just construct `hir::Expr` and then call `self.lower_attrs` later if it needs attributes.

As most desugaring code don't use attributes, this allows some code cleanup.

1  2 
compiler/rustc_ast_lowering/src/expr.rs