about summary refs log tree commit diff
path: root/src/ast/hir.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/hir.rs')
-rw-r--r--src/ast/hir.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ast/hir.rs b/src/ast/hir.rs
index 151ddd529872..9db6919f6f53 100644
--- a/src/ast/hir.rs
+++ b/src/ast/hir.rs
@@ -26,7 +26,7 @@ impl<'a, T> Binding<'a, T> {
 pub enum Expr<'a, T> {
     Ident(Ident<'a>, T),
 
-    Literal(Literal, T),
+    Literal(Literal<'a>, T),
 
     UnaryOp {
         op: UnaryOperator,
@@ -158,7 +158,7 @@ impl<'a, T> Expr<'a, T> {
     {
         match self {
             Expr::Ident(id, t) => Expr::Ident(id.to_owned(), t.clone()),
-            Expr::Literal(lit, t) => Expr::Literal(lit.clone(), t.clone()),
+            Expr::Literal(lit, t) => Expr::Literal(lit.to_owned(), t.clone()),
             Expr::UnaryOp { op, rhs, type_ } => Expr::UnaryOp {
                 op: *op,
                 rhs: Box::new((**rhs).to_owned()),