]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_llvm/consts.rs
Rollup merge of #73862 - oli-obk:const_array_to_slice, r=RalfJung
[rust.git] / src / librustc_codegen_llvm / consts.rs
index 43ced8ee5b13cdf094120b37538a50c5175ecdbb..9d9b53fc4a87c5adcead1140055b56d1a6676881 100644 (file)
@@ -212,6 +212,7 @@ impl CodegenCx<'ll, 'tcx> {
         let g = if let Some(def_id) = def_id.as_local() {
             let id = self.tcx.hir().as_local_hir_id(def_id);
             let llty = self.layout_of(ty).llvm_type(self);
+            // FIXME: refactor this to work without accessing the HIR
             let (g, attrs) = match self.tcx.hir().get(id) {
                 Node::Item(&hir::Item { attrs, span, kind: hir::ItemKind::Static(..), .. }) => {
                     let sym_str = sym.as_str();