1
Fork 0

Morph layout_raw query into layout_of.

This commit is contained in:
Eduard-Mihai Burtescu 2021-08-24 21:29:30 +03:00
parent b5fe3bc065
commit edb4b2d8c2
9 changed files with 56 additions and 96 deletions

View file

@ -1063,7 +1063,7 @@ impl Layout {
/// to that obtained from `layout_of(ty)`, as we need to produce
/// layouts for which Rust types do not exist, such as enum variants
/// or synthetic fields of enums (i.e., discriminants) and fat pointers.
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, HashStable_Generic)]
pub struct TyAndLayout<'a, Ty> {
pub ty: Ty,
pub layout: &'a Layout,