summaryrefslogtreecommitdiffstats
path: root/crates/rebel-lang
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rebel-lang')
-rw-r--r--crates/rebel-lang/src/typing.rs2
-rw-r--r--crates/rebel-lang/src/value.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/rebel-lang/src/typing.rs b/crates/rebel-lang/src/typing.rs
index 87776d0..e85a588 100644
--- a/crates/rebel-lang/src/typing.rs
+++ b/crates/rebel-lang/src/typing.rs
@@ -235,7 +235,7 @@ impl<'scope> Context<'scope> {
return Ok(Type::unit());
};
- self.assign_destr_pat_type(&pat::DestrPat::from(pat), expr_type)?
+ self.assign_destr_pat_type(&pat::DestrPat::from(pat.borrowed()), expr_type)?
}
ast::BlockStmt::Assign { dest, expr } => {
let expr_type = self.type_expr(expr)?;
diff --git a/crates/rebel-lang/src/value.rs b/crates/rebel-lang/src/value.rs
index ce766cb..6c9a5b0 100644
--- a/crates/rebel-lang/src/value.rs
+++ b/crates/rebel-lang/src/value.rs
@@ -139,7 +139,7 @@ impl<'scope> Context<'scope> {
return Ok(Value::unit());
};
- self.assign_destr_pat_value(&pat::DestrPat::from(pat), value)?
+ self.assign_destr_pat_value(&pat::DestrPat::from(pat.borrowed()), value)?
}
ast::BlockStmt::Assign { dest, expr } => {
let value = self.eval_expr(expr)?;