]> git.lizzy.rs Git - rust.git/commit
Merge #5981
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Fri, 11 Sep 2020 21:11:59 +0000 (21:11 +0000)
committerGitHub <noreply@github.com>
Fri, 11 Sep 2020 21:11:59 +0000 (21:11 +0000)
commitc8623461a57e7882ac47b5da13a1a03efa58f603
tree5559fe8ce90fff8f0e5ed9debf67a0c7306f668a
parent199ebf110353da2da4d706f72adede96149ba977
parent779ea2ea0a0aa70075d28d72dd96c1bc1e709300
Merge #5981

5981: Properly preserve macro braces during dbg! removal r=jonas-schievink a=SomeoneToIgnore

Do `dbg![2 + 2] * 5` -> `(2 + 2) * 5`

This PR also implicitly handles the `{}` case too, but I decided not to add it into the test case since it's a compiler error on the latest stable rustc.

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>