//@ check-pass use std::iter::FromIterator; struct DynamicAlt

(P); impl

FromIterator

for DynamicAlt

{ fn from_iter>(_iter: T) -> Self { loop {} } } fn owned_context(_: F) -> impl FnMut(I) -> I { |i| i } trait Parser {} impl Parser for T where T: FnMut(I) -> I {} fn alt>(_: DynamicAlt

) -> impl FnMut(I) -> I { |i| i } fn rule_to_parser<'c>() -> impl Parser<&'c str> { move |input| { let v: Vec<()> = vec![]; alt(v.iter().map(|()| owned_context(rule_to_parser())).collect::>())(input) } } fn main() {}