format_ident! seems to support the new capturing format strings introduced in Rust 1.58 on first glance. However, format_ident!("{name}") with a captured variable name: Ident produces an Ident with Span::call_site(), whereas format_ident!("{}", name) produces an Ident that keeps the span of name.