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 @@ -149,6 +149,15 @@ Therefore you should use `tests/ui/update-all-references.sh` (after running
149
149
` cargo test ` ) and check whether the output looks as you expect with ` git diff ` . Commit all
150
150
` *.stderr ` files, too.
151
151
152
+ If the lint you are working on is making use of structured suggestions, the
153
+ test file should include a ` // run-rustfix ` comment at the top. This will
154
+ additionally run [ rustfix] ( https://github.com/rust-lang-nursery/rustfix ) for
155
+ that test. Rustfix will apply the suggestions from the lint to the code of the
156
+ test file and compare that to the contents of a ` .fixed ` file.
157
+
158
+ Use ` tests/ui/update-all-references.sh ` to automatically generate the
159
+ ` .fixed ` file after running ` cargo test ` .
160
+
152
161
### Running rustfmt
153
162
154
163
[ 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