about summary refs log tree commit diff
path: root/users/grfn/achilles/src/passes/hir/strip_positive_units.rs
diff options
context:
space:
mode:
Diffstat (limited to 'users/grfn/achilles/src/passes/hir/strip_positive_units.rs')
-rw-r--r--users/grfn/achilles/src/passes/hir/strip_positive_units.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/users/grfn/achilles/src/passes/hir/strip_positive_units.rs b/users/grfn/achilles/src/passes/hir/strip_positive_units.rs
index 91b56551c82d..85ee1cce4859 100644
--- a/users/grfn/achilles/src/passes/hir/strip_positive_units.rs
+++ b/users/grfn/achilles/src/passes/hir/strip_positive_units.rs
@@ -1,7 +1,7 @@
 use std::collections::HashMap;
 use std::mem;
 
-use ast::hir::Binding;
+use ast::hir::{Binding, Pattern};
 use ast::Literal;
 use void::{ResultVoidExt, Void};
 
@@ -42,8 +42,10 @@ impl<'a, 'ast> Visitor<'a, 'ast, ast::Type<'ast>> for StripPositiveUnits {
                 bindings: extracted
                     .into_iter()
                     .map(|expr| Binding {
-                        ident: Ident::from_str_unchecked("___discarded"),
-                        type_: expr.type_().clone(),
+                        pat: Pattern::Id(
+                            Ident::from_str_unchecked("___discarded"),
+                            expr.type_().clone(),
+                        ),
                         body: expr,
                     })
                     .collect(),