about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorPascal Hertleif <killercup@gmail.com>2018-04-20 00:04:08 +0200
committerAlex Crichton <alex@alexcrichton.com>2018-05-04 15:01:28 -0700
commitfd6aa149bca7b896650c5f15a9c0000fc4f0056d (patch)
tree63426dfa52298734730ed903ada68aff32f6e3d6 /src/rustllvm/RustWrapper.cpp
parent91db9dcf3730207f63b3dfc33b2c438a769b7517 (diff)
downloadrust-fd6aa149bca7b896650c5f15a9c0000fc4f0056d.tar.gz
rust-fd6aa149bca7b896650c5f15a9c0000fc4f0056d.zip
First step towards rustfix compiletest mode
This is the first small step towards testing auto-fixable compiler
suggestions using compiletest. Currently, it only checks if next to a
UI test there also happens to a `*.rs.fixed` file, and then uses rustfix
(added as external crate) on the original file, and asserts that it
produces the fixed version.

To show that this works, I've included one such test. I picked this test
case at random (and because it was simple) -- It is not relevant to the
2018 edition. Indeed, in the near future, we want to be able to restrict
rustfix to edition-lints, so this test cast might go away soon.

In case you still think this is somewhat feature-complete, here's a
quick list of things currently missing that I want to add before telling
people they can use this:

- [ ] Make this an actual compiletest mode, with `test [fix] …` output
  and everything
- [ ] Assert that fixed files still compile
- [ ] Assert that fixed files produce no (or a known set of) diagnostics
  output
- [ ] Update `update-references.sh` to support rustfix
- [ ] Use a published version of rustfix (i.e.: publish a new version
  rustfix that exposes a useful API for this)
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions