Skip to content

Commit

Permalink
Relax %parse-param bounds from Copy to Clone
Browse files Browse the repository at this point in the history
  • Loading branch information
ratmice committed Sep 30, 2024
1 parent 2140334 commit 9f62a1a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions lrpar/src/lib/cpctplus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ struct CPCTPlus<
StorageT: 'static + Eq + Hash + PrimInt + Unsigned,
LexerTypesT: LexerTypes<StorageT = StorageT>,
ActionT: 'a,
ParamT: Copy,
ParamT: Clone,
> where
usize: AsPrimitive<StorageT>,
{
Expand All @@ -118,7 +118,7 @@ pub(super) fn recoverer<
StorageT: 'static + Debug + Eq + Hash + PrimInt + Unsigned,
LexerTypesT: LexerTypes<StorageT = StorageT>,
ActionT: 'a,
ParamT: Copy,
ParamT: Clone,
>(
parser: &'a Parser<StorageT, LexerTypesT, ActionT, ParamT>,
) -> Box<dyn Recoverer<StorageT, LexerTypesT, ActionT, ParamT> + 'a>
Expand All @@ -135,7 +135,7 @@ impl<
StorageT: 'static + Debug + Eq + Hash + PrimInt + Unsigned,
LexerTypesT: LexerTypes<StorageT = StorageT>,
ActionT: 'a,
ParamT: Copy,
ParamT: Clone,
> Recoverer<StorageT, LexerTypesT, ActionT, ParamT>
for CPCTPlus<'a, 'b, 'input, StorageT, LexerTypesT, ActionT, ParamT>
where
Expand Down Expand Up @@ -270,7 +270,7 @@ impl<
StorageT: 'static + Debug + Eq + Hash + PrimInt + Unsigned,
LexerTypesT: LexerTypes<StorageT = StorageT>,
ActionT: 'a,
ParamT: Copy,
ParamT: Clone,
> CPCTPlus<'a, 'b, 'input, StorageT, LexerTypesT, ActionT, ParamT>
where
usize: AsPrimitive<StorageT>,
Expand Down Expand Up @@ -457,7 +457,7 @@ fn apply_repairs<
StorageT: 'static + Debug + Eq + Hash + PrimInt + Unsigned,
LexerTypesT: LexerTypes<StorageT = StorageT>,
ActionT: 'a,
ParamT: Copy,
ParamT: Clone,
>(
parser: &Parser<StorageT, LexerTypesT, ActionT, ParamT>,
mut laidx: usize,
Expand Down Expand Up @@ -496,7 +496,7 @@ fn simplify_repairs<
StorageT: 'static + Eq + Hash + PrimInt + Unsigned,
LexerTypesT: LexerTypes<StorageT = StorageT>,
ActionT,
ParamT: Copy,
ParamT: Clone,
>(
parser: &Parser<StorageT, LexerTypesT, ActionT, ParamT>,
all_rprs: &mut Vec<Vec<ParseRepair<LexerTypesT::LexemeT, StorageT>>>,
Expand Down Expand Up @@ -557,7 +557,7 @@ fn rank_cnds<
StorageT: 'static + Debug + Eq + Hash + PrimInt + Unsigned,
LexerTypesT: LexerTypes<StorageT = StorageT>,
ActionT: 'a,
ParamT: Copy,
ParamT: Clone,
>(
parser: &Parser<StorageT, LexerTypesT, ActionT, ParamT>,
finish_by: Instant,
Expand Down
10 changes: 5 additions & 5 deletions lrpar/src/lib/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub(super) struct Parser<
StorageT: 'static + Eq + Hash + PrimInt + Unsigned,
LexerTypesT: LexerTypes<StorageT = StorageT>,
ActionT: 'a,
ParamT: Copy,
ParamT: Clone,
> where
usize: AsPrimitive<StorageT>,
{
Expand Down Expand Up @@ -241,7 +241,7 @@ impl<
StorageT: 'static + Debug + Eq + Hash + PrimInt + Unsigned,
LexerTypesT: LexerTypes<StorageT = StorageT>,
ActionT: 'a,
ParamT: Copy,
ParamT: Clone,
> Parser<'a, 'b, 'input, StorageT, LexerTypesT, ActionT, ParamT>
where
usize: AsPrimitive<StorageT>,
Expand Down Expand Up @@ -329,7 +329,7 @@ where
self.lexer,
span,
astack.drain(pop_idx - 1..),
self.param,
self.param.clone(),
));
astack.push(v);
}
Expand Down Expand Up @@ -447,7 +447,7 @@ where
self.lexer,
span,
astack_uw.drain(pop_idx - 1..),
self.param,
self.param.clone(),
));
astack_uw.push(v);
} else {
Expand Down Expand Up @@ -595,7 +595,7 @@ pub(super) trait Recoverer<
StorageT: 'static + Debug + Hash + PrimInt + Unsigned,
LexerTypesT: LexerTypes<StorageT = StorageT>,
ActionT,
ParamT: Copy,
ParamT: Clone,
> where
usize: AsPrimitive<StorageT>,
{
Expand Down

0 comments on commit 9f62a1a

Please sign in to comment.