Skip to content

Commit f8c3f86

Browse files
committed
Remove useless copies of labels in rename.
These new bindings were unecessary. Leftover from when renaming used a separate arena?
1 parent 16c7172 commit f8c3f86

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fathom/src/surface/elaboration/unification.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,13 +611,11 @@ impl<'arena, 'env> Context<'arena, 'env> {
611611
}
612612

613613
Value::RecordType(labels, types) => {
614-
let labels = self.scope.to_scope(labels); // FIXME: avoid copy if this is the same arena?
615614
let types = self.rename_telescope(meta_var, types)?;
616615

617616
Ok(Term::RecordType(span, labels, types))
618617
}
619618
Value::RecordLit(labels, exprs) => {
620-
let labels = self.scope.to_scope(labels); // FIXME: avoid copy if this is the same arena?
621619
let mut new_exprs = SliceVec::new(self.scope, exprs.len());
622620
for expr in exprs {
623621
new_exprs.push(self.rename(meta_var, expr)?);
@@ -636,7 +634,6 @@ impl<'arena, 'env> Context<'arena, 'env> {
636634
}
637635

638636
Value::FormatRecord(labels, formats) => {
639-
let labels = self.scope.to_scope(labels); // FIXME: avoid copy if this is the same arena?
640637
let formats = self.rename_telescope(meta_var, formats)?;
641638

642639
Ok(Term::FormatRecord(span, labels, formats))
@@ -652,7 +649,6 @@ impl<'arena, 'env> Context<'arena, 'env> {
652649
))
653650
}
654651
Value::FormatOverlap(labels, formats) => {
655-
let labels = self.scope.to_scope(labels); // FIXME: avoid copy if this is the same arena?
656652
let formats = self.rename_telescope(meta_var, formats)?;
657653

658654
Ok(Term::FormatOverlap(span, labels, formats))

0 commit comments

Comments
 (0)