diff --git a/crates/compiler/mono/src/copy.rs b/crates/compiler/mono/src/copy.rs index 0e5ba2ad70..e2dd5e0200 100644 --- a/crates/compiler/mono/src/copy.rs +++ b/crates/compiler/mono/src/copy.rs @@ -15,7 +15,7 @@ trait CopyEnv { #[inline(always)] fn clear_source_copy(&mut self, var: Variable) { self.mut_source().modify(var, |descriptor| { - if let Some(_) = descriptor.copy.into_variable() { + if descriptor.copy.into_variable().is_some() { descriptor.copy = OptVariable::NONE; } else { debug_assert!(false, "{:?} marked as copied but it wasn't", var); @@ -193,7 +193,7 @@ pub fn deep_copy_expr_across_subs( /// Deep copies all type variables in [`expr`]. /// Returns [`None`] if the expression does not need to be copied. -fn deep_copy_type_vars_into_expr_help<'a, C: CopyEnv>( +fn deep_copy_type_vars_into_expr_help( env: &mut C, var: Variable, expr: &Expr, @@ -219,7 +219,7 @@ fn deep_copy_type_vars_into_expr_help<'a, C: CopyEnv>( return Some((copy_expr_var, copied_expr)); - fn help<'a, C: CopyEnv>(env: &mut C, expr: &Expr, copied: &mut Vec) -> Expr { + fn help(env: &mut C, expr: &Expr, copied: &mut Vec) -> Expr { use Expr::*; macro_rules! sub { @@ -563,7 +563,7 @@ fn deep_copy_type_vars_into_expr_help<'a, C: CopyEnv>( /// Deep copies the type variables in [`var`], returning a map of original -> new type variable for /// all type variables copied. #[inline] -fn deep_copy_type_vars<'a, C: CopyEnv>( +fn deep_copy_type_vars( env: &mut C, copied: &mut Vec, var: Variable,