Generalized base::unsized_info
This commit is contained in:
committed by
Eduard-Mihai Burtescu
parent
484e07c231
commit
034f69753b
@@ -8,11 +8,22 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use rustc::ty::layout::{HasTyCtxt, LayoutOf, TyLayout};
|
||||
use rustc::ty::Ty;
|
||||
use std::fmt::Debug;
|
||||
|
||||
pub trait Backend {
|
||||
pub trait BackendTypes {
|
||||
type Value: Debug + PartialEq + Copy;
|
||||
type BasicBlock;
|
||||
type Type: Debug + PartialEq + Copy;
|
||||
type Context;
|
||||
}
|
||||
|
||||
pub trait Backend<'tcx>:
|
||||
BackendTypes + HasTyCtxt<'tcx> + LayoutOf<Ty = Ty<'tcx>, TyLayout = TyLayout<'tcx>>
|
||||
{
|
||||
}
|
||||
|
||||
impl<'tcx, T> Backend<'tcx> for T where
|
||||
Self: BackendTypes + HasTyCtxt<'tcx> + LayoutOf<Ty = Ty<'tcx>, TyLayout = TyLayout<'tcx>>
|
||||
{}
|
||||
|
||||
Reference in New Issue
Block a user