Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 3f6025a

Browse files
authored
book: indicate that at least one error marker is required (rust-lang#14589)
This is a recent change, and no error marker is inserted by default in the file generated by `cargo dev new_lint`. changelog: none r? @y21
2 parents 3dd1a9b + dd21b6e commit 3f6025a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

book/src/development/adding_lints.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,14 @@ fn main() {
126126
```
127127

128128
Note that we are adding comment annotations with the name of our lint to mark
129-
lines where we expect an error. Once we have implemented our lint we can run
130-
`TESTNAME=foo_functions cargo uibless` to generate the `.stderr` file. If our
131-
lint makes use of structured suggestions then this command will also generate
132-
the corresponding `.fixed` file.
129+
lines where we expect an error. Except for very specific situations
130+
(`//@check-pass`), at least one error marker must be present in a test file for
131+
it to be accepted.
132+
133+
Once we have implemented our lint we can run `TESTNAME=foo_functions cargo
134+
uibless` to generate the `.stderr` file. If our lint makes use of structured
135+
suggestions then this command will also generate the corresponding `.fixed`
136+
file.
133137

134138
While we are working on implementing our lint, we can keep running the UI test.
135139
That allows us to check if the output is turning into what we want by checking the

0 commit comments

Comments
 (0)