about summary refs log tree commit diff
path: root/src/ast/hir.rs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2021-03-14T15·53-0400
committerGriffin Smith <root@gws.fyi>2021-03-14T15·53-0400
commit39656a3801bb311edd9ebb65e92a24fc48f69ec7 (patch)
treed408937901c7789c033373019a94e014a03522a8 /src/ast/hir.rs
parent32a5c0ff0fc58aa6721c1e0ad41950bde2d66744 (diff)
Add string support to the frontend
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()),