priroda required functions

This commit is contained in:
Oliver Schneider 2017-01-11 10:04:17 +01:00
parent 8084d60f54
commit 927844ab24
No known key found for this signature in database
GPG key ID: 56D6EEA0FC67AC46

View file

@ -688,7 +688,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
Ok((offset, ty))
}
fn get_field_ty(&self, ty: Ty<'tcx>, field_index: usize) -> EvalResult<'tcx, Ty<'tcx>> {
pub fn get_field_ty(&self, ty: Ty<'tcx>, field_index: usize) -> EvalResult<'tcx, Ty<'tcx>> {
match ty.sty {
ty::TyAdt(adt_def, substs) => {
Ok(adt_def.struct_variant().fields[field_index].ty(self.tcx, substs))
@ -1011,7 +1011,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
Ok(())
}
pub(super) fn ty_to_primval_kind(&self, ty: Ty<'tcx>) -> EvalResult<'tcx, PrimValKind> {
pub fn ty_to_primval_kind(&self, ty: Ty<'tcx>) -> EvalResult<'tcx, PrimValKind> {
use syntax::ast::FloatTy;
let kind = match ty.sty {