dtolnay / reflect

Compile-time reflection API for developing robust procedural macros (proof of concept)

Home Page:https://docs.rs/reflect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline literals in generated code

dtolnay opened this issue · comments

Part of the Debug example currently compiles to:

let __v7 = "x";
let _ = ::std::fmt::DebugStruct::field(__v6, __v7, __v3);

It doesn't matter here for correctness but this would be more readable in cargo expand if emitted as:

let _ = ::std::fmt::DebugStruct::field(__v6, "x", __v3);