diff --git a/src/grammar.ron b/src/grammar.ron index 38453b45cf1..3efd60ee520 100644 --- a/src/grammar.ron +++ b/src/grammar.ron @@ -150,6 +150,5 @@ Grammar( "LIFETIME_PARAM", "TYPE_PARAM_LIST", "TYPE_ARG_LIST", - ] ) diff --git a/src/yellow/red.rs b/src/yellow/red.rs index 8907100e4d1..bffb72510b2 100644 --- a/src/yellow/red.rs +++ b/src/yellow/red.rs @@ -5,7 +5,7 @@ use {yellow::GreenNode, TextUnit}; pub(crate) struct RedNode { green: GreenNode, parent: Option, - children: RwLock>>, + children: RwLock]>>, } #[derive(Debug)] @@ -36,7 +36,9 @@ impl RedNode { fn new(green: GreenNode, parent: Option) -> RedNode { let n_children = green.children().len(); - let children = (0..n_children).map(|_| None).collect(); + let children = (0..n_children).map(|_| None) + .collect::>() + .into_boxed_slice(); RedNode { green, parent,