summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src/expr.rs
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-07-16 14:42:26 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2021-10-09 11:56:29 +0200
commit48a339ddbbc1e1c364d1cb39d3fef8aad9105345 (patch)
tree026c4e1fc303359720147fc83487223925fc484d /compiler/rustc_ast_lowering/src/expr.rs
parentf9e1de979db1e19acad5c2785057e0f2c25ee1f5 (diff)
downloadrust-48a339ddbbc1e1c364d1cb39d3fef8aad9105345.tar.gz
rust-48a339ddbbc1e1c364d1cb39d3fef8aad9105345.zip
Store lowering outputs per owner.
Diffstat (limited to 'compiler/rustc_ast_lowering/src/expr.rs')
-rw-r--r--compiler/rustc_ast_lowering/src/expr.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs
index 6027027428e..22f93f50788 100644
--- a/compiler/rustc_ast_lowering/src/expr.rs
+++ b/compiler/rustc_ast_lowering/src/expr.rs
@@ -252,9 +252,10 @@ impl<'hir> LoweringContext<'_, 'hir> {
                     }
                     // Merge attributes into the inner expression.
                     if !e.attrs.is_empty() {
-                        let old_attrs = self.attrs.get(&ex.hir_id).map(|la| *la).unwrap_or(&[]);
+                        let old_attrs =
+                            self.attrs.get(&ex.hir_id.local_id).map(|la| *la).unwrap_or(&[]);
                         self.attrs.insert(
-                            ex.hir_id,
+                            ex.hir_id.local_id,
                             &*self.arena.alloc_from_iter(
                                 e.attrs
                                     .iter()