Open HadrienG2 opened 2 years ago
Actually, I think fully fixing this requires higher-kinded types or generic associated types, because you need to be generic over a family of error types (each input lifetime leads to a different error type). So in current Rust, I believe I can only "fix" this by forcing the error type to be nom::error::Error
for now.
As a result of adjusting the design to account for any nom parser that ingests either &[u8] or &str, the Error type parameter is now broken in the sense of being unspecifiable (you cannot write Error<&str> because Rust will ask you for the lifetime of that &str). Fix that.