File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,15 @@ Therefore you should use `tests/ui/update-all-references.sh` (after running
156
156
` cargo test ` ) and check whether the output looks as you expect with ` git diff ` . Commit all
157
157
` *.stderr ` files, too.
158
158
159
+ If the lint you are working on is making use of structured suggestions, the
160
+ test file should include a ` // run-rustfix ` comment at the top. This will
161
+ additionally run [ rustfix] ( https://github.com/rust-lang-nursery/rustfix ) for
162
+ that test. Rustfix will apply the suggestions from the lint to the code of the
163
+ test file and compare that to the contents of a ` .fixed ` file.
164
+
165
+ Use ` tests/ui/update-all-references.sh ` to automatically generate the
166
+ ` .fixed ` file after running ` cargo test ` .
167
+
159
168
### Running rustfmt
160
169
161
170
[ Rustfmt] ( https://github.com/rust-lang/rustfmt ) is a tool for formatting Rust code according
You can’t perform that action at this time.
0 commit comments