diff options
| author | Mark Mansi <markm@cs.wisc.edu> | 2019-11-05 10:51:36 -0600 |
|---|---|---|
| committer | Who? Me?! <mark-i-m@users.noreply.github.com> | 2019-11-05 11:56:31 -0600 |
| commit | eba330a5b1dc1916f44fd91b26fab8b791862731 (patch) | |
| tree | e93fcad1d3d6c6676071c5de2a178755d4308816 /src/doc/rustc-dev-guide | |
| parent | 4134cd4b044f12e63075d8c8eed4fe0e28ad575c (diff) | |
| download | rust-eba330a5b1dc1916f44fd91b26fab8b791862731.tar.gz rust-eba330a5b1dc1916f44fd91b26fab8b791862731.zip | |
add guidelines for future-incompat lints
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/diagnostics.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/diagnostics.md b/src/doc/rustc-dev-guide/src/diagnostics.md index 62baa7b60a0..9cfd5a3e198 100644 --- a/src/doc/rustc-dev-guide/src/diagnostics.md +++ b/src/doc/rustc-dev-guide/src/diagnostics.md @@ -271,6 +271,15 @@ If you need a combination of options that's not supported by the `declare_lint!` macro, you can always define your own static with a type of `&Lint` but this is currently linted against in the compiler tree. +#### Guidelines for creating a future incompatibility lint + +- Create a lint defaulting to warn as normal, with ideally the same error + message you would normally give. +- Add a suitable reference, typically an RFC or tracking issue. Go ahead + and include the full URL, sort items in ascending order of issue numbers. +- Later, change lint to error. +- Eventually, remove lint. + ### Lint Groups Lints can be turned on in groups. These groups are declared in the |
