mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-13 09:49:11 +03:00
Make pattern_symbols be a slice
This commit is contained in:
parent
4acb9fa325
commit
0f8906b6d3
@ -202,7 +202,7 @@ pub fn gen(
|
|||||||
let proc = PartialProc {
|
let proc = PartialProc {
|
||||||
annotation: def.expr_var,
|
annotation: def.expr_var,
|
||||||
// This is a 0-arity thunk, so it has no arguments.
|
// This is a 0-arity thunk, so it has no arguments.
|
||||||
pattern_symbols: bumpalo::collections::Vec::new_in(arena),
|
pattern_symbols: &[],
|
||||||
body,
|
body,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ use std::collections::HashMap;
|
|||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
pub struct PartialProc<'a> {
|
pub struct PartialProc<'a> {
|
||||||
pub annotation: Variable,
|
pub annotation: Variable,
|
||||||
pub pattern_symbols: Vec<'a, Symbol>,
|
pub pattern_symbols: &'a [Symbol],
|
||||||
pub body: roc_can::expr::Expr,
|
pub body: roc_can::expr::Expr,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ fn patterns_to_when<'a>(
|
|||||||
) -> Result<
|
) -> Result<
|
||||||
(
|
(
|
||||||
Vec<'a, Variable>,
|
Vec<'a, Variable>,
|
||||||
Vec<'a, Symbol>,
|
&'a [Symbol],
|
||||||
Located<roc_can::expr::Expr>,
|
Located<roc_can::expr::Expr>,
|
||||||
),
|
),
|
||||||
Located<RuntimeError>,
|
Located<RuntimeError>,
|
||||||
@ -483,7 +483,7 @@ fn patterns_to_when<'a>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
match body {
|
match body {
|
||||||
Ok(body) => Ok((arg_vars, symbols, body)),
|
Ok(body) => Ok((arg_vars, symbols.into_bump_slice(), body)),
|
||||||
Err(loc_error) => Err(loc_error),
|
Err(loc_error) => Err(loc_error),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user