about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-03 18:41:54 +0000
committerbors <bors@rust-lang.org>2022-07-03 18:41:54 +0000
commit0fd4f1c75b4a7b341844596ae71c61224ca96d7e (patch)
tree0eaf25613025dc7056099108750ed69e98427b75
parentb8bdbb7a00346f8d78019e77402003f46af0eb55 (diff)
parent2dd5fc14da4065fa0ac7710582e7393822d40d37 (diff)
downloadrust-0fd4f1c75b4a7b341844596ae71c61224ca96d7e.tar.gz
rust-0fd4f1c75b4a7b341844596ae71c61224ca96d7e.zip
Auto merge of #9112 - xFrednet:9088-fix-lint-versions, r=Jarcho
Correct `[clippy::version]` for 1.62 lints and add note to docs

closes: https://github.com/rust-lang/rust-clippy/issues/9088

changelog: none

---

It feels weird to have such a short PR description. So, what should I add to this one... Yes, art:

```txt
 ,-----.,--.,--.
'  .--./|  |`--' ,---.  ,---.,--. ,--.
|  |    |  |,--.| .-. || .-. |\  '  /
'  '--'\|  ||  || '-' '| '-' ' \   '
 `-----'`--'`--'|  |-' |  |-'.-'  /
                `--'   `--'  `---'
```

```txt
 ,-----.,--.   ,--.,------. ,------.,--.   ,--.
'  .--./|  |   |  ||  .--. '|  .--. '\  `.'  /
|  |    |  |   |  ||  '--' ||  '--' | '.    /
'  '--'\|  '--.|  ||  | --' |  | --'    |  |
 `-----'`-----'`--'`--'     `--'        `--'
```

```txt
   _____ _      _____ _____  _______     __
  / ____| |    |_   _|  __ \|  __ \ \   / /
 | |    | |      | | | |__) | |__) \ \_/ /
 | |    | |      | | |  ___/|  ___/ \   /
 | |____| |____ _| |_| |    | |      | |
  \_____|______|_____|_|    |_|      |_|
```
-rw-r--r--book/src/development/infrastructure/changelog_update.md3
-rw-r--r--clippy_lints/src/await_holding_invalid.rs2
-rw-r--r--clippy_lints/src/casts/mod.rs2
-rw-r--r--clippy_lints/src/crate_in_macro_def.rs2
-rw-r--r--clippy_lints/src/drop_forget_ref.rs4
-rw-r--r--clippy_lints/src/empty_drop.rs2
-rw-r--r--clippy_lints/src/methods/mod.rs6
7 files changed, 12 insertions, 9 deletions
diff --git a/book/src/development/infrastructure/changelog_update.md b/book/src/development/infrastructure/changelog_update.md
index e560f4c6a3e..80a47affe30 100644
--- a/book/src/development/infrastructure/changelog_update.md
+++ b/book/src/development/infrastructure/changelog_update.md
@@ -95,6 +95,9 @@ As section headers, we use:
 Please also be sure to update the Beta/Unreleased sections at the top with the
 relevant commit ranges.
 
+If you have the time, it would be appreciated if you double-check, that the
+`#[clippy::version]` attributes for the added lints contains the correct version.
+
 [changelog]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md
 [forge]: https://forge.rust-lang.org/
 [rust_master_tools]: https://github.com/rust-lang/rust/tree/master/src/tools/clippy
diff --git a/clippy_lints/src/await_holding_invalid.rs b/clippy_lints/src/await_holding_invalid.rs
index eee5f90d178..1761360fb28 100644
--- a/clippy_lints/src/await_holding_invalid.rs
+++ b/clippy_lints/src/await_holding_invalid.rs
@@ -161,7 +161,7 @@ declare_clippy_lint! {
     ///   baz().await; // Lint violation
     /// }
     /// ```
-    #[clippy::version = "1.49.0"]
+    #[clippy::version = "1.62.0"]
     pub AWAIT_HOLDING_INVALID_TYPE,
     suspicious,
     "holding a type across an await point which is not allowed to be held as per the configuration"
diff --git a/clippy_lints/src/casts/mod.rs b/clippy_lints/src/casts/mod.rs
index 02c2f30a4dd..af3798a0cc8 100644
--- a/clippy_lints/src/casts/mod.rs
+++ b/clippy_lints/src/casts/mod.rs
@@ -500,7 +500,7 @@ declare_clippy_lint! {
     /// let x: i32 = -42;
     /// let y: u32 = x.unsigned_abs();
     /// ```
-    #[clippy::version = "1.61.0"]
+    #[clippy::version = "1.62.0"]
     pub CAST_ABS_TO_UNSIGNED,
     suspicious,
     "casting the result of `abs()` to an unsigned integer can panic"
diff --git a/clippy_lints/src/crate_in_macro_def.rs b/clippy_lints/src/crate_in_macro_def.rs
index 9b8a481b6ea..f6ec8fe7edc 100644
--- a/clippy_lints/src/crate_in_macro_def.rs
+++ b/clippy_lints/src/crate_in_macro_def.rs
@@ -43,7 +43,7 @@ declare_clippy_lint! {
     /// #[allow(clippy::crate_in_macro_def)]
     /// macro_rules! ok { ... crate::foo ... }
     /// ```
-    #[clippy::version = "1.61.0"]
+    #[clippy::version = "1.62.0"]
     pub CRATE_IN_MACRO_DEF,
     suspicious,
     "using `crate` in a macro definition"
diff --git a/clippy_lints/src/drop_forget_ref.rs b/clippy_lints/src/drop_forget_ref.rs
index 25014bfa1a5..b35f0b8ca52 100644
--- a/clippy_lints/src/drop_forget_ref.rs
+++ b/clippy_lints/src/drop_forget_ref.rs
@@ -116,7 +116,7 @@ declare_clippy_lint! {
     /// let x = Foo;
     /// std::mem::drop(x);
     /// ```
-    #[clippy::version = "1.61.0"]
+    #[clippy::version = "1.62.0"]
     pub DROP_NON_DROP,
     suspicious,
     "call to `std::mem::drop` with a value which does not implement `Drop`"
@@ -136,7 +136,7 @@ declare_clippy_lint! {
     /// let x = Foo;
     /// std::mem::forget(x);
     /// ```
-    #[clippy::version = "1.61.0"]
+    #[clippy::version = "1.62.0"]
     pub FORGET_NON_DROP,
     suspicious,
     "call to `std::mem::forget` with a value which does not implement `Drop`"
diff --git a/clippy_lints/src/empty_drop.rs b/clippy_lints/src/empty_drop.rs
index 325ae2356c1..ec063c0f777 100644
--- a/clippy_lints/src/empty_drop.rs
+++ b/clippy_lints/src/empty_drop.rs
@@ -26,7 +26,7 @@ declare_clippy_lint! {
     /// ```rust
     /// struct S;
     /// ```
-    #[clippy::version = "1.61.0"]
+    #[clippy::version = "1.62.0"]
     pub EMPTY_DROP,
     restriction,
     "empty `Drop` implementations"
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs
index cc1530f0ed0..e8a239ecc7a 100644
--- a/clippy_lints/src/methods/mod.rs
+++ b/clippy_lints/src/methods/mod.rs
@@ -369,7 +369,7 @@ declare_clippy_lint! {
     /// let x: Result<u32, &str> = Ok(10);
     /// x.expect_err("Testing expect_err");
     /// ```
-    #[clippy::version = "1.61.0"]
+    #[clippy::version = "1.62.0"]
     pub ERR_EXPECT,
     style,
     r#"using `.err().expect("")` when `.expect_err("")` can be used"#
@@ -2215,7 +2215,7 @@ declare_clippy_lint! {
     /// c.is_ascii_digit();
     /// c.is_ascii_hexdigit();
     /// ```
-    #[clippy::version = "1.61.0"]
+    #[clippy::version = "1.62.0"]
     pub IS_DIGIT_ASCII_RADIX,
     style,
     "use of `char::is_digit(..)` with literal radix of 10 or 16"
@@ -2235,7 +2235,7 @@ declare_clippy_lint! {
     /// let x = Some(3);
     /// x.as_ref();
     /// ```
-    #[clippy::version = "1.61.0"]
+    #[clippy::version = "1.62.0"]
     pub NEEDLESS_OPTION_TAKE,
     complexity,
     "using `.as_ref().take()` on a temporary value"