diff options
| author | bors <bors@rust-lang.org> | 2021-11-11 12:38:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-11-11 12:38:04 +0000 |
| commit | 3bfe98d372fc4dacd12a7f0c06d44d72e2e96cd2 (patch) | |
| tree | 2f390f1637b1797ed060c1c65970811e42456a7f /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff | |
| parent | 8389df9db7833c73c9bfd5445718260d1d5e9842 (diff) | |
| parent | 8c45fd88d0ca43775b215e1b94b2175e8f4c05d2 (diff) | |
| download | rust-3bfe98d372fc4dacd12a7f0c06d44d72e2e96cd2.tar.gz rust-3bfe98d372fc4dacd12a7f0c06d44d72e2e96cd2.zip | |
Auto merge of #7813 - xFrednet:6492-lint-version, r=flip1995
Add Clippy version to Clippy's lint list
Hey, hey, the semester is finally over, and I wanted to get back into hacking on Clippy. It has also been some time since our metadata collection monster has been feed. So, this PR adds a new attribute `clippy::version` to document which version a lint was stabilized. I considered using `git blame` but that would be very hacky and probably not accurate.
I'm also thinking that this attribute can be used to have a `clippy::nightly` lint group which is allow-by-default that delays setting the actual lint group until the defined version is reached. Just something to consider regarding #6623 :upside_down_face:
This PR only adds the version to 4 lints to keep it reviewable. I'll do a followup PR to add the version to other lints if the implementation is accepted :upside_down_face:

Also, mobile approved xD

---
r? `@flip1995`
cc: #7172
closes: #6492
changelog: [Clippy's lint list](https://rust-lang.github.io/rust-clippy/master/index.html) now displays the version a lint was added. :tada:
---
Example lint declaration after this update:
```rs
declare_clippy_lint! {
/// [...]
///
/// ### Example
/// ```rust
/// // Bad
/// let x = 3.14;
/// // Good
/// let x = std::f32::consts::PI;
/// ```
#[clippy::version = "pre 1.29.0"]
pub APPROX_CONSTANT,
correctness,
"the approximate of a known float constant (in `std::fXX::consts`)"
}
```
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions
