diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2019-11-28 23:50:47 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2019-12-21 23:20:09 +0100 |
| commit | abbe6259e1a4e7bf6e2eccbae0748c0e5c15ebb0 (patch) | |
| tree | 1e449d18ad49c82871fa4a6d5880b78562404494 /src/librustc_codegen_llvm | |
| parent | 084e6722f97560891cfe70dc7ab649f22eaf9aae (diff) | |
| download | rust-abbe6259e1a4e7bf6e2eccbae0748c0e5c15ebb0.tar.gz rust-abbe6259e1a4e7bf6e2eccbae0748c0e5c15ebb0.zip | |
Handle Attributes in arena.
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/consts.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs index 11a105c1828..e1750887ac4 100644 --- a/src/librustc_codegen_llvm/consts.rs +++ b/src/librustc_codegen_llvm/consts.rs @@ -232,7 +232,7 @@ impl CodegenCx<'ll, 'tcx> { let llty = self.layout_of(ty).llvm_type(self); let (g, attrs) = match self.tcx.hir().get(id) { Node::Item(&hir::Item { - ref attrs, span, kind: hir::ItemKind::Static(..), .. + attrs, span, kind: hir::ItemKind::Static(..), .. }) => { let sym_str = sym.as_str(); if let Some(g) = self.get_declared_value(&sym_str) { @@ -256,7 +256,7 @@ impl CodegenCx<'ll, 'tcx> { ref attrs, span, kind: hir::ForeignItemKind::Static(..), .. }) => { let fn_attrs = self.tcx.codegen_fn_attrs(def_id); - (check_and_apply_linkage(&self, &fn_attrs, ty, sym, span), attrs) + (check_and_apply_linkage(&self, &fn_attrs, ty, sym, span), &**attrs) } item => bug!("get_static: expected static, found {:?}", item) |
