if I run cargo fmt, the empty angle brackets got removed:
// this line
impl<> ::my_crate::Foo for Foo<> {}
// turns into this:
impl ::my_crate::Foo for Foo {}
I don't want to use #[rustfmt::skip] since I still want the basic formatting done automatically, like indentation, is there a config or attribute I can use for this? or is there a trick to change the helper macro to prevent rustfmt from modifying the code?
btw, I noticed rustfmt will NOT modify code inside quote! {} without my helper check_derive_expansion, so it must have something to do with the way my helper macro is defined.
I think a whitespace only mode would be great, but based on the design doc and this closed issue, I'm not holding my breath. So maybe your best bet is a future option that preserves empty <>s (though that also seems a bit far-fetched?).[1]
yeah, I only really need a quick, convenient "fix indentation", if would be great if rustfmt can support this, since it's tight integration with the toolings.
for now, I think I'll just disable the formatting of the macro invocation. bummer, but not a big deal.