diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs index 07dde2d0301f..aac3ee903b10 100644 --- a/src/librustc_codegen_llvm/consts.rs +++ b/src/librustc_codegen_llvm/consts.rs @@ -171,7 +171,7 @@ pub fn ptrcast(val: &'ll Value, ty: &'ll Type) -> &'ll Value { } } -impl StaticMethods<'tcx> for CodegenCx<'ll, 'tcx> { +impl StaticMethods for CodegenCx<'ll, 'tcx> { fn static_ptrcast(&self, val: &'ll Value, ty: &'ll Type) -> &'ll Value { ptrcast(val, ty) diff --git a/src/librustc_codegen_ssa/traits/consts.rs b/src/librustc_codegen_ssa/traits/consts.rs index c0a544521956..e30567c78faa 100644 --- a/src/librustc_codegen_ssa/traits/consts.rs +++ b/src/librustc_codegen_ssa/traits/consts.rs @@ -8,14 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use super::Backend; +use super::BackendTypes; use mir::place::PlaceRef; use rustc::mir::interpret::Allocation; use rustc::mir::interpret::Scalar; use rustc::ty::layout; use syntax::symbol::LocalInternedString; -pub trait ConstMethods<'tcx>: Backend<'tcx> { +pub trait ConstMethods<'tcx>: BackendTypes { // Constant constructors fn const_null(&self, t: Self::Type) -> Self::Value; diff --git a/src/librustc_codegen_ssa/traits/mod.rs b/src/librustc_codegen_ssa/traits/mod.rs index 1c334898ce6a..b475d790140b 100644 --- a/src/librustc_codegen_ssa/traits/mod.rs +++ b/src/librustc_codegen_ssa/traits/mod.rs @@ -62,7 +62,7 @@ pub trait CodegenMethods<'tcx>: + TypeMethods<'tcx> + MiscMethods<'tcx> + ConstMethods<'tcx> - + StaticMethods<'tcx> + + StaticMethods + DebugInfoMethods<'tcx> + AbiMethods<'tcx> + IntrinsicDeclarationMethods<'tcx> @@ -77,7 +77,7 @@ impl<'tcx, T> CodegenMethods<'tcx> for T where + TypeMethods<'tcx> + MiscMethods<'tcx> + ConstMethods<'tcx> - + StaticMethods<'tcx> + + StaticMethods + DebugInfoMethods<'tcx> + AbiMethods<'tcx> + IntrinsicDeclarationMethods<'tcx> diff --git a/src/librustc_codegen_ssa/traits/statics.rs b/src/librustc_codegen_ssa/traits/statics.rs index 172c48f8a85f..5026d34dcadc 100644 --- a/src/librustc_codegen_ssa/traits/statics.rs +++ b/src/librustc_codegen_ssa/traits/statics.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use super::Backend; +use super::BackendTypes; use rustc::hir::def_id::DefId; use rustc::ty::layout::Align; -pub trait StaticMethods<'tcx>: Backend<'tcx> { +pub trait StaticMethods: BackendTypes { fn static_ptrcast(&self, val: Self::Value, ty: Self::Type) -> Self::Value; fn static_bitcast(&self, val: Self::Value, ty: Self::Type) -> Self::Value; fn static_addr_of_mut(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value;