mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Make pattern_vars be a slice
This commit is contained in:
parent
a4f4da7f5a
commit
8751e4bd00
2 changed files with 6 additions and 6 deletions
|
@ -133,7 +133,7 @@ pub fn gen(
|
||||||
procs.insert_exposed(
|
procs.insert_exposed(
|
||||||
symbol,
|
symbol,
|
||||||
layout,
|
layout,
|
||||||
pattern_vars, //: Vec<'a, Variable>,
|
pattern_vars.into_bump_slice(),
|
||||||
annotation,
|
annotation,
|
||||||
ret_var,
|
ret_var,
|
||||||
);
|
);
|
||||||
|
@ -177,7 +177,7 @@ pub fn gen(
|
||||||
procs.insert_exposed(
|
procs.insert_exposed(
|
||||||
symbol,
|
symbol,
|
||||||
layout,
|
layout,
|
||||||
pattern_vars,
|
pattern_vars.into_bump_slice(),
|
||||||
// It seems brittle that we're passing
|
// It seems brittle that we're passing
|
||||||
// annotation twice - especially since
|
// annotation twice - especially since
|
||||||
// in both cases we're giving the
|
// in both cases we're giving the
|
||||||
|
|
|
@ -30,7 +30,7 @@ pub struct PartialProc<'a> {
|
||||||
pub struct PendingSpecialization<'a> {
|
pub struct PendingSpecialization<'a> {
|
||||||
pub fn_var: Variable,
|
pub fn_var: Variable,
|
||||||
pub ret_var: Variable,
|
pub ret_var: Variable,
|
||||||
pub pattern_vars: Vec<'a, Variable>,
|
pub pattern_vars: &'a [Variable],
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
|
@ -203,7 +203,7 @@ impl<'a> Procs<'a> {
|
||||||
let pending = PendingSpecialization {
|
let pending = PendingSpecialization {
|
||||||
ret_var,
|
ret_var,
|
||||||
fn_var: annotation,
|
fn_var: annotation,
|
||||||
pattern_vars,
|
pattern_vars: pattern_vars.into_bump_slice(),
|
||||||
};
|
};
|
||||||
|
|
||||||
match &mut self.pending_specializations {
|
match &mut self.pending_specializations {
|
||||||
|
@ -268,7 +268,7 @@ impl<'a> Procs<'a> {
|
||||||
&mut self,
|
&mut self,
|
||||||
name: Symbol,
|
name: Symbol,
|
||||||
layout: Layout<'a>,
|
layout: Layout<'a>,
|
||||||
pattern_vars: Vec<'a, Variable>,
|
pattern_vars: &'a [Variable],
|
||||||
fn_var: Variable,
|
fn_var: Variable,
|
||||||
ret_var: Variable,
|
ret_var: Variable,
|
||||||
) {
|
) {
|
||||||
|
@ -2948,7 +2948,7 @@ fn call_by_name<'a>(
|
||||||
result
|
result
|
||||||
} else {
|
} else {
|
||||||
let pending = PendingSpecialization {
|
let pending = PendingSpecialization {
|
||||||
pattern_vars,
|
pattern_vars: pattern_vars.into_bump_slice(),
|
||||||
ret_var,
|
ret_var,
|
||||||
fn_var,
|
fn_var,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue