fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout {
        let param_env = self.param_env.with_reveal_all();
        let ty = self.tcx.normalize_erasing_regions(param_env, ty);
        let details = self.tcx.layout_raw(param_env.and(ty))?;
        let layout = TyLayout {
            ty,
            details
        };

        // NB: This recording is normally disabled; when enabled, it
        // can however trigger recursive invocations of `layout_of`.
        // Therefore, we execute it *after* the main query has
        // completed, to avoid problems around recursive structures
        // and the like. (Admittedly, I wasn't able to reproduce a problem
        // here, but it seems like the right thing to do. -nmatsakis)
        self.record_layout_for_printing(layout);

        Ok(layout)
    }
/// Computes the layout of a type. Note that this implicitly
/// executes in "reveal all" mode.
Computes the layout of a type. Note that this implicitly
executes in "reveal all" mode.
Computes the layout of a type . Note that this implicitly executes in " reveal all " mode .
fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout {
        let param_env = self.param_env.with_reveal_all();
        let ty = self.tcx.normalize_erasing_regions(param_env, ty);
        let details = self.tcx.layout_raw(param_env.and(ty))?;
        let layout = TyLayout {
            ty,
            details
        };
        // NB: This recording is normally disabled; when enabled, it
        // can however trigger recursive invocations of `layout_of`.
        // Therefore, we execute it *after* the main query has
        // completed, to avoid problems around recursive structures
        // and the like. (Admittedly, I wasn't able to reproduce a problem
        // here, but it seems like the right thing to do. -nmatsakis)
        self.record_layout_for_printing(layout);
        Ok(layout)
    }
fn layout_of ( self , ty : Ty < ' tcx > ) -> Self :: TyLayout { let param_env = self . param_env . with_reveal_all ( ) ; let ty = self . tcx . normalize_erasing_regions ( param_env , ty ) ; let details = self . tcx . layout_raw ( param_env . and ( ty ) ) ? ; let layout = TyLayout { ty , details } ; // NB: This recording is normally disabled; when enabled, it // can however trigger recursive invocations of `layout_of`. // Therefore, we execute it *after* the main query has // completed, to avoid problems around recursive structures // and the like. (Admittedly, I wasn't able to reproduce a problem // here, but it seems like the right thing to do. -nmatsakis) self . record_layout_for_printing ( layout ) ; Ok ( layout ) }
Computes the layout of a type.
Computes the layout of a type .
self
ty
Ty<'tcx>
self
ty
Ty<'tcx>