diff --git a/cedar-policy-core/src/ast/restricted_expr.rs b/cedar-policy-core/src/ast/restricted_expr.rs index 5110f1508..2963c3daf 100644 --- a/cedar-policy-core/src/ast/restricted_expr.rs +++ b/cedar-policy-core/src/ast/restricted_expr.rs @@ -265,7 +265,7 @@ impl<'a> From> for &'a Expr { } impl<'a> AsRef for BorrowedRestrictedExpr<'a> { - fn as_ref(&self) -> &Expr { + fn as_ref(&self) -> &'a Expr { self.0 } } @@ -279,8 +279,8 @@ impl RestrictedExpr { impl<'a> Deref for BorrowedRestrictedExpr<'a> { type Target = Expr; - fn deref(&self) -> &Expr { - self.as_ref() + fn deref(&self) -> &'a Expr { + self.0 } }