about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/traits/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/traits/mod.rs')
-rw-r--r--compiler/rustc_codegen_ssa/src/traits/mod.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/traits/mod.rs b/compiler/rustc_codegen_ssa/src/traits/mod.rs
index f662a766bb8..d6acf7e3cb8 100644
--- a/compiler/rustc_codegen_ssa/src/traits/mod.rs
+++ b/compiler/rustc_codegen_ssa/src/traits/mod.rs
@@ -27,6 +27,11 @@ mod write;
 
 use std::fmt;
 
+use rustc_middle::ty::layout::FnAbiOf;
+use rustc_middle::ty::Ty;
+use rustc_target::abi::call::FnAbi;
+use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
+
 pub use self::abi::AbiBuilderMethods;
 pub use self::asm::{AsmBuilderMethods, AsmMethods, GlobalAsmOperandRef, InlineAsmOperandRef};
 pub use self::backend::{BackendTypes, CodegenBackend, ExtraBackendMethods};
@@ -46,7 +51,9 @@ pub use self::write::{ModuleBufferMethods, ThinBufferMethods, WriteBackendMethod
 
 pub trait CodegenObject = Copy + PartialEq + fmt::Debug;
 
-pub trait CodegenMethods<'tcx> = TypeMethods<'tcx>
+pub trait CodegenMethods<'tcx> = LayoutOf<'tcx, LayoutOfResult = TyAndLayout<'tcx>>
+    + FnAbiOf<'tcx, FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>>
+    + TypeMethods<'tcx>
     + ConstMethods<'tcx>
     + StaticMethods
     + DebugInfoMethods<'tcx>