Open
Description
With Rust 1.77.1 and rustfmt
1.7.0, as well as on current nightly 2024-03-30
, the following macro definition (playground)
macro_rules! assert_eq_and_type {
($left:expr, $right:expr $(,)?) => {
{
fn check_statically_same_type<T>(_: &T, _: &T) {}
check_statically_same_type(&$left, &$right);
}
assert_eq!($left, $right);
};
}
formats to
macro_rules! assert_eq_and_type {
($left:expr, $right:expr $(,)?) => {{
fn check_statically_same_type<T>(_: &T, _: &T) {}
check_statically_same_type(&$left, &$right);
}
assert_eq!($left, $right);};
}
This certainly doesn't look right to me. I looked at other reported macro-related issues but couldn't find any very similar issues.