]> git.lizzy.rs Git - rust.git/commit
Some simple improvements to MIR pretty printing
authorJonas Schievink <jonas@schievink.net>
Thu, 12 May 2016 22:20:59 +0000 (00:20 +0200)
committerJonas Schievink <jonas@schievink.net>
Thu, 12 May 2016 22:20:59 +0000 (00:20 +0200)
commit96b178b131c63b38aa760381a4a0359fd8a17ed1
treeb9685e58ef6bbfba5547e828d13b3df344aad20c
parente88defe71806ad190588e168e513bc1098f7c9fb
Some simple improvements to MIR pretty printing

In short, this PR changes the MIR printer so that it:

* places an empty line between the MIR for each item
* does *not* write an empty line before the first BB when there are no
  var decls
* aligns the "// Scope" comments 50 chars in (makes the output more
  readable)
* prints the scope comments as "// scope N at ..." instead of "//
  Scope(N) at ..."
* prints a prettier scope tree:
 * no more unbalanced delimiters!
 * no more "Parent" entry (these convey no useful information)
 * drop the "Scope()" and just print scope IDs
 * no braces when the scope is empty
src/librustc_mir/pretty.rs