about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2018-04-18 14:41:29 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2018-04-18 15:37:30 +0200
commit33bcb4ed16b01abeaa762c99e452da82c9c6275f (patch)
tree935bd7d77bfa5ef7864abaab680e2d9ac93952c1 /src/rustllvm/PassWrapper.cpp
parent1a4326d3fb83f88f10139ec2f00c3fb5442775d7 (diff)
downloadrust-33bcb4ed16b01abeaa762c99e452da82c9c6275f.tar.gz
rust-33bcb4ed16b01abeaa762c99e452da82c9c6275f.zip
When running under compare-mode=nll, generate expected output to `foo.nll.stderr`
This allows easy revision of the update-references.sh script (included
here) so that it can update the expected output for nll rather than
stderr. It also reminds the rustc developer via the filename that they
are looking at output generated under comapre-mode=nll.

One could argue that there is still a problem with the strategy encoded here:
if we reach a scenario where a change to the compiler brings the output
under AST and NLL modes back into sync, this code will continue to still
generate output to distinct `foo.stderr` and `foo.nll.stderr` files, and
will continue to copy those two files back to corresponding distinct
files in the source tree, even if the *content* of the two files is now the
same.

  * Arguably the "right thing" to do in that case is to remove the
    `foo.nll.stderr` file entirely.

  * However, I think the real answer is that we will probably want to
    double-check such cases by hand anyway. We should be regularly
    double-checking the diffs between `foo.stderr` and
    `foo.nll.stderr`, and if we see a zero-diff case, then we should
    evaluate whether that is correct, and if so, remove the file by
    hand.)

  * In any case, I think the default behavior encoded here (or at
    least *intended* to be encoded here) is superior to the
    alternative of *only* generating a `foo.nll.stderr` file if one
    already existed in the source tree at the time that `compiletest`
    was invoked (and otherwise unconditionally generating a
    `foo.stderr` file, as was the behavior prior to this commit),
    because that alternative is more likely to cause rustc developers
    to overwrite a `foo.stderr` file with the stderr output from a
    compare-mode=nll run, which will then break the *normal*
    `compiletest` run and probably be much more confusing for the
    average rustc developer.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions