diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs index 4c2d73282cb0..676d182dbac9 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 0eeddd9a29e3..6f498892b717 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);