From 5810f93f9b560ca492a62222ca23a607d119b6e5 Mon Sep 17 00:00:00 2001 From: imaqtkatt Date: Mon, 17 Jun 2024 12:20:08 -0300 Subject: [PATCH] Update golden_tests.rs and readd desugar_use call after linearize matches --- src/lib.rs | 1 + tests/golden_tests.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 9cf3b040..413453a7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -129,6 +129,7 @@ pub fn desugar_book( ctx.check_unbound_vars()?; ctx.book.make_var_names_unique(); + ctx.book.desugar_use(); ctx.book.make_var_names_unique(); ctx.book.linearize_vars(); diff --git a/tests/golden_tests.rs b/tests/golden_tests.rs index 8204b5f8..e876b2cc 100644 --- a/tests/golden_tests.rs +++ b/tests/golden_tests.rs @@ -239,6 +239,7 @@ fn simplify_matches() { ctx.desugar_with_blocks()?; ctx.check_unbound_vars()?; ctx.book.make_var_names_unique(); + ctx.book.desugar_use(); ctx.book.linearize_match_binds(); ctx.book.linearize_match_with(); ctx.check_unbound_vars()?; @@ -288,6 +289,7 @@ fn encode_pattern_match() { ctx.desugar_with_blocks()?; ctx.check_unbound_vars()?; ctx.book.make_var_names_unique(); + ctx.book.desugar_use(); ctx.book.linearize_match_binds(); ctx.book.linearize_match_with(); ctx.book.encode_matches(adt_encoding);