-
Notifications
You must be signed in to change notification settings - Fork 838
Open
Description
Previously, we have:
Lines 52 to 58 in 869f897
| #[cfg_attr(feature = "docsrs", doc(cfg(feature = "alloc")))] | |
| pub fn many0<I, O, E, F>(mut f: F) -> impl FnMut(I) -> IResult<I, Vec<O>, E> | |
| where | |
| I: Clone + InputLength, | |
| F: Parser<I, O, E>, | |
| E: ParseError<I>, | |
| { |
and
pub trait InputLength {
fn input_len(&self) -> usize;
}
impl<'a, T> InputLength for &'a [T] {
#[inline]
fn input_len(&self) -> usize {
self.len()
}
}So InputLength is implemented for &[proc_macro2::TokenTree].
But now we have:
Lines 61 to 67 in 2cec1b3
| #[cfg(feature = "alloc")] | |
| #[cfg_attr(feature = "docsrs", doc(cfg(feature = "alloc")))] | |
| pub fn many0<I, F>( | |
| f: F, | |
| ) -> impl Parser<I, Output = Vec<<F as Parser<I>>::Output>, Error = <F as Parser<I>>::Error> | |
| where | |
| I: Clone + Input, |
So &[proc_macro2::TokenTree] can no longer directly adapted in many0.
Perhaps we can wrap a newtype to work it around. But I'd first report this use case and see if there is better/idiomatic way.
cc @Geal
Metadata
Metadata
Assignees
Labels
No labels