Skip to content

Commit dcd2b0c

Browse files
committed
add guidelines for future-incompat lints
1 parent d3bfd4a commit dcd2b0c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/diagnostics.md

+9
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,15 @@ If you need a combination of options that's not supported by the
271271
`declare_lint!` macro, you can always define your own static with a type of
272272
`&Lint` but this is currently linted against in the compiler tree.
273273

274+
#### Guidelines for creating a future incompatibility lint
275+
276+
- Create a lint defaulting to warn as normal, with ideally the same error
277+
message you would normally give.
278+
- Add a suitable reference, typically an RFC or tracking issue. Go ahead
279+
and include the full URL, sort items in ascending order of issue numbers.
280+
- Later, change lint to error.
281+
- Eventually, remove lint.
282+
274283
### Lint Groups
275284

276285
Lints can be turned on in groups. These groups are declared in the

0 commit comments

Comments
 (0)