mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-23 02:27:39 +03:00
ed1d154b7d
std: avoid tearing `dbg!` prints Fixes https://github.com/rust-lang/rust/issues/136703. This is an alternative to rust-lang/rust#149859. Instead of formatting everything into a string, this PR makes multi-expression `dbg!` expand into multiple nested matches, with the final match containing a single `eprint!`. By using macro recursion and relying on hygiene, this allows naming every bound value in that `eprint!`. CC @orlp r? libs