Document how to write tests requiring the 2018 edition

This commit is contained in:
flip1995 2019-08-09 19:14:59 +02:00
parent c55d38ed7a
commit 99d1cde8d8
No known key found for this signature in database
GPG Key ID: 693086869D506637

View File

@ -10,6 +10,7 @@ because that's clearly a non-descriptive name.
* [Setup](#Setup)
* [Testing](#Testing)
* [Rustfix tests](#Rustfix-tests)
* [Edition 2018 tests](#Edition-2018-tests)
* [Lint declaration](#Lint-declaration)
* [Lint passes](#Lint-passes)
* [Emitting a lint](#Emitting-a-lint)
@ -101,6 +102,12 @@ Use `tests/ui/update-all-references.sh` to automatically generate the
With tests in place, let's have a look at implementing our lint now.
### Edition 2018 tests
Some features require the 2018 edition to work (e.g. `async_await`), but
compile-test tests run on the 2015 edition by default. To change this behavior
add `// compile-flags: --edition 2018` at the top of the test file.
### Testing manually
Manually testing against an example file can be useful if you have added some