pub fn read(bytes: &[u8]) -> Result<()> {
let (input, _) = tag("tag")(bytes)?;
Ok((input, ()))
}
pub type Result<'a, O = &'a [u8], I = [u8]> = nom::IResult<&'a I, O>;
pub trait Parser<'a, O = &'a [u8]>: (FnMut(&'a [u8]) -> Result<O>) {}
impl<'a, F, O> Parser<'a, O> for F where F: (FnMut(&'a [u8]) -> Result<O>) {}
pub fn tag<'a>(s: &'a str) -> impl Parser<'a,&'a [u8]> {
nom::bytes::complete::tag(s)
}
[dependencies]
nom = "7.1.1"
RA produces error for the block tag("tag")(bytes) stating the trait 'Try' is not implemented for '_'.
cargo build runs fine.
Rolling back to RA 0.3.1238 makes the error disappear.
rust-analyzer version: rust-analyzer version: 0.3.1248-standalone (0531aab 2022-10-16)
rustc version: rustc 1.66.0-nightly (3f83906 2022-09-24)