Rustfmt on cg_ssa/traits
This commit is contained in:
parent
15a5009af0
commit
66c3195c4c
3 changed files with 7 additions and 3 deletions
|
@ -38,7 +38,8 @@ pub trait Backend<'tcx>:
|
||||||
|
|
||||||
impl<'tcx, T> Backend<'tcx> for T where
|
impl<'tcx, T> Backend<'tcx> for T where
|
||||||
Self: BackendTypes + HasTyCtxt<'tcx> + LayoutOf<Ty = Ty<'tcx>, TyLayout = TyLayout<'tcx>>
|
Self: BackendTypes + HasTyCtxt<'tcx> + LayoutOf<Ty = Ty<'tcx>, TyLayout = TyLayout<'tcx>>
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
pub trait ExtraBackendMethods: CodegenBackend + WriteBackendMethods + Sized + Send {
|
pub trait ExtraBackendMethods: CodegenBackend + WriteBackendMethods + Sized + Send {
|
||||||
fn new_metadata(&self, sess: &Session, mod_name: &str) -> Self::Module;
|
fn new_metadata(&self, sess: &Session, mod_name: &str) -> Self::Module;
|
||||||
|
|
|
@ -16,7 +16,9 @@ use syntax_pos::Span;
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub enum OverflowOp {
|
pub enum OverflowOp {
|
||||||
Add, Sub, Mul
|
Add,
|
||||||
|
Sub,
|
||||||
|
Mul,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait IntrinsicCallMethods<'tcx>: HasCodegen<'tcx> {
|
pub trait IntrinsicCallMethods<'tcx>: HasCodegen<'tcx> {
|
||||||
|
|
|
@ -82,7 +82,8 @@ impl<'tcx, T> CodegenMethods<'tcx> for T where
|
||||||
+ DeclareMethods<'tcx>
|
+ DeclareMethods<'tcx>
|
||||||
+ AsmMethods<'tcx>
|
+ AsmMethods<'tcx>
|
||||||
+ PreDefineMethods<'tcx>
|
+ PreDefineMethods<'tcx>
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
pub trait HasCodegen<'tcx>: Backend<'tcx> {
|
pub trait HasCodegen<'tcx>: Backend<'tcx> {
|
||||||
type CodegenCx: CodegenMethods<'tcx>
|
type CodegenCx: CodegenMethods<'tcx>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue