diff options
author | Nadrieril | 2019-04-11 13:59:42 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-11 14:00:00 +0200 |
commit | 822d828f2f82790b1d0efaac402fe119c56d9006 (patch) | |
tree | 2527d501ce22d21a23d227da4c349e001d9506a6 /dhall/src | |
parent | d3f14966120fae672dc890b718ebada74ebed533 (diff) |
Remove premature #[inline(always)]
Closes #57
Diffstat (limited to '')
-rw-r--r-- | dhall/src/typecheck.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/dhall/src/typecheck.rs b/dhall/src/typecheck.rs index 91846bc..2a527fb 100644 --- a/dhall/src/typecheck.rs +++ b/dhall/src/typecheck.rs @@ -24,53 +24,42 @@ impl Resolved { } } impl Typed { - #[inline(always)] fn as_expr(&self) -> &SubExpr<X, X> { &self.0 } - #[inline(always)] fn into_expr(self) -> SubExpr<X, X> { self.0 } - #[inline(always)] pub fn get_type(&self) -> &Type { &self.1 } - #[inline(always)] fn get_type_move(self) -> Type { self.1 } } impl Normalized { - #[inline(always)] fn as_expr(&self) -> &SubExpr<X, X> { &self.0 } - #[inline(always)] pub(crate) fn into_expr(self) -> SubExpr<X, X> { self.0 } - #[inline(always)] pub fn get_type(&self) -> &Type { &self.1 } - #[inline(always)] pub(crate) fn into_type(self) -> Type { crate::expr::Type(TypeInternal::Expr(Box::new(self))) } // Expose the outermost constructor - #[inline(always)] fn unroll_ref(&self) -> &Expr<X, X> { self.as_expr().as_ref() } - #[inline(always)] fn shift(&self, delta: isize, var: &V<Label>) -> Self { // shift the type too ? Normalized(shift(delta, var, &self.0), self.1.clone()) } } impl Type { - #[inline(always)] pub fn as_normalized(&self) -> Result<&Normalized, TypeError<X>> { use TypeInternal::*; match &self.0 { @@ -82,7 +71,6 @@ impl Type { )), } } - #[inline(always)] pub(crate) fn into_normalized(self) -> Result<Normalized, TypeError<X>> { use TypeInternal::*; match self.0 { @@ -95,11 +83,9 @@ impl Type { } } // Expose the outermost constructor - #[inline(always)] fn unroll_ref(&self) -> Result<&Expr<X, X>, TypeError<X>> { Ok(self.as_normalized()?.unroll_ref()) } - #[inline(always)] pub fn get_type(&self) -> &Type { use TypeInternal::*; match &self.0 { @@ -107,7 +93,6 @@ impl Type { Untyped => &UNTYPE, } } - #[inline(always)] fn shift(&self, delta: isize, var: &V<Label>) -> Self { use TypeInternal::*; crate::expr::Type(match &self.0 { @@ -116,16 +101,13 @@ impl Type { }) } - #[inline(always)] pub fn const_sort() -> Self { Normalized(rc(ExprF::Const(Const::Sort)), UNTYPE).into_type() } - #[inline(always)] pub fn const_kind() -> Self { Normalized(rc(ExprF::Const(Const::Kind)), Type::const_sort()) .into_type() } - #[inline(always)] pub fn const_type() -> Self { Normalized(rc(ExprF::Const(Const::Type)), Type::const_kind()) .into_type() |