rustc_target: require TyAbiInterface
in LayoutOf
.
This commit is contained in:
parent
8486571a10
commit
87d1fb747f
4 changed files with 47 additions and 5 deletions
|
@ -1174,8 +1174,8 @@ impl<'a, Ty> Deref for TyAndLayout<'a, Ty> {
|
|||
}
|
||||
|
||||
/// Trait for context types that can compute layouts of things.
|
||||
pub trait LayoutOf<'a> {
|
||||
type Ty;
|
||||
pub trait LayoutOf<'a>: Sized {
|
||||
type Ty: TyAbiInterface<'a, Self>;
|
||||
type TyAndLayout: MaybeResult<TyAndLayout<'a, Self::Ty>>;
|
||||
|
||||
fn layout_of(&self, ty: Self::Ty) -> Self::TyAndLayout;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue