I was attempting a macro like following
from_converter!(std::io::Error, MyError);
macro_rules! from_converter {
($e: tt, $n: tt) => {
impl std::convert::From<$e> for Error {
fn from(source: $e) -> Self {
$n.into_error(source)
}
}
};
}
The compilation error I get is:
no rules expected the token `::`
no rules expected this token in macro callrustc
error.rs(37, 1): when calling this macro
error.rs(47, 20): no rules expected this token in macro call