]> git.lizzy.rs Git - rust.git/commit
Auto merge of #33607 - jonas-schievink:prettier-mir, r=eddyb
authorbors <bors@rust-lang.org>
Sun, 15 May 2016 08:14:10 +0000 (01:14 -0700)
committerbors <bors@rust-lang.org>
Sun, 15 May 2016 08:14:10 +0000 (01:14 -0700)
commit1a26d2364f9da1667ca0098d3cc4a213d131f481
tree2b3314160aaced7d8bc0c7bbb7ed34cd3016e1dc
parent088d4178522d4e9464c6beac70b14724670ee735
parent2c7e398935fe10aa2adea453ca0a2251b3c387e8
Auto merge of #33607 - jonas-schievink:prettier-mir, r=eddyb

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

In action: https://gist.github.com/jonas-schievink/1c11226cbb112892a9470ce0f9870b65