about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2018-11-24 17:30:48 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2018-11-29 18:19:43 +0100
commite8da3c6c3266cb4b7673ca78c19dea64dcee8759 (patch)
treeb5a019233f68cdad850cbdb748d7c3a452dec586
parentaaca5a38ee1a2144ba84bf863e59bafb89c37346 (diff)
downloadrust-e8da3c6c3266cb4b7673ca78c19dea64dcee8759.tar.gz
rust-e8da3c6c3266cb4b7673ca78c19dea64dcee8759.zip
Remove static_addr_of_mut from cg_ssa
-rw-r--r--src/librustc_codegen_llvm/consts.rs6
-rw-r--r--src/librustc_codegen_ssa/traits/statics.rs1
2 files changed, 3 insertions, 4 deletions
diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs
index 4c2d73282cb..676d182dbac 100644
--- a/src/librustc_codegen_llvm/consts.rs
+++ b/src/librustc_codegen_llvm/consts.rs
@@ -177,10 +177,8 @@ impl CodegenCx<'ll, 'tcx> {
             llvm::LLVMConstBitCast(val, ty)
         }
     }
-}
 
-impl StaticMethods for CodegenCx<'ll, 'tcx> {
-    fn static_addr_of_mut(
+    crate fn static_addr_of_mut(
         &self,
         cv: &'ll Value,
         align: Align,
@@ -205,7 +203,9 @@ impl StaticMethods for CodegenCx<'ll, 'tcx> {
             gv
         }
     }
+}
 
+impl StaticMethods for CodegenCx<'ll, 'tcx> {
     fn static_addr_of(
         &self,
         cv: &'ll Value,
diff --git a/src/librustc_codegen_ssa/traits/statics.rs b/src/librustc_codegen_ssa/traits/statics.rs
index 0eeddd9a29e..6f498892b71 100644
--- a/src/librustc_codegen_ssa/traits/statics.rs
+++ b/src/librustc_codegen_ssa/traits/statics.rs
@@ -13,7 +13,6 @@ use rustc::hir::def_id::DefId;
 use rustc::ty::layout::Align;
 
 pub trait StaticMethods: BackendTypes {
-    fn static_addr_of_mut(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value;
     fn static_addr_of(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value;
     fn get_static(&self, def_id: DefId) -> Self::Value;
     fn codegen_static(&self, def_id: DefId, is_mutable: bool);