Tweak and explain the BuilderMethods
/CodegenMethods
connection.
This commit is contained in:
parent
108f8c8164
commit
85a4d2af90
1 changed files with 6 additions and 3 deletions
|
@ -17,7 +17,7 @@ use super::debuginfo::DebugInfoBuilderMethods;
|
|||
use super::intrinsic::IntrinsicCallBuilderMethods;
|
||||
use super::misc::MiscMethods;
|
||||
use super::type_::{ArgAbiBuilderMethods, BaseTypeMethods, LayoutTypeMethods};
|
||||
use super::{BackendTypes, CodegenMethods, StaticBuilderMethods};
|
||||
use super::{CodegenMethods, StaticBuilderMethods};
|
||||
use crate::common::{
|
||||
AtomicOrdering, AtomicRmwBinOp, IntPredicate, RealPredicate, SynchronizationScope, TypeKind,
|
||||
};
|
||||
|
@ -45,8 +45,11 @@ pub trait BuilderMethods<'a, 'tcx>:
|
|||
+ AsmBuilderMethods<'tcx>
|
||||
+ StaticBuilderMethods
|
||||
{
|
||||
type CodegenCx: CodegenMethods<'tcx>
|
||||
+ BackendTypes<
|
||||
// `BackendTypes` is a supertrait of both `CodegenMethods` and
|
||||
// `BuilderMethods`. This bound ensures all impls agree on the associated
|
||||
// types within.
|
||||
type CodegenCx: CodegenMethods<
|
||||
'tcx,
|
||||
Value = Self::Value,
|
||||
Function = Self::Function,
|
||||
BasicBlock = Self::BasicBlock,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue