Auto merge of #8979 - Alexendoo:version-numbers, r=flip1995

Correct some `#[clippy::version]`s

Some were a bit off

changelog: none
This commit is contained in:
bors 2022-06-09 14:02:36 +00:00
commit 65f518e06c
10 changed files with 14 additions and 14 deletions

View File

@ -414,7 +414,7 @@
/// enum E { X = 256 };
/// let _ = E::X as u8;
/// ```
#[clippy::version = "1.60.0"]
#[clippy::version = "1.61.0"]
pub CAST_ENUM_TRUNCATION,
suspicious,
"casts from an enum type to an integral type which will truncate the value"
@ -459,7 +459,7 @@
/// println!("{:?}", &*new_ptr);
/// }
/// ```
#[clippy::version = "1.60.0"]
#[clippy::version = "1.61.0"]
pub CAST_SLICE_DIFFERENT_SIZES,
correctness,
"casting using `as` between raw pointers to slices of types with different sizes"

View File

@ -163,7 +163,7 @@
/// }
/// }
/// ```
#[clippy::version = "1.52.0"]
#[clippy::version = "1.51.0"]
pub MISSING_PANICS_DOC,
pedantic,
"`pub fn` may panic without `# Panics` in doc comment"

View File

@ -45,7 +45,7 @@
/// println!("{}", first);
/// }
/// ```
#[clippy::version = "1.58.0"]
#[clippy::version = "1.59.0"]
pub INDEX_REFUTABLE_SLICE,
nursery,
"avoid indexing on slices which could be destructed"

View File

@ -596,7 +596,7 @@
/// std::hint::spin_loop()
/// }
/// ```
#[clippy::version = "1.59.0"]
#[clippy::version = "1.61.0"]
pub MISSING_SPIN_LOOP,
perf,
"An empty busy waiting loop"

View File

@ -141,7 +141,7 @@
/// vec.iter().take(10).cloned();
/// vec.iter().last().cloned();
/// ```
#[clippy::version = "1.59.0"]
#[clippy::version = "1.60.0"]
pub ITER_OVEREAGER_CLONED,
perf,
"using `cloned()` early with `Iterator::iter()` can lead to some performance inefficiencies"
@ -1907,7 +1907,7 @@
/// let x = [1, 2, 3];
/// let y: Vec<_> = x.iter().map(|x| 2*x).collect();
/// ```
#[clippy::version = "1.52.0"]
#[clippy::version = "1.47.0"]
pub MAP_IDENTITY,
complexity,
"using iterator.map(|x| x)"
@ -2100,7 +2100,7 @@
/// let str = "key=value=add";
/// let _ = str.split('=').next().unwrap();
/// ```
#[clippy::version = "1.58.0"]
#[clippy::version = "1.59.0"]
pub NEEDLESS_SPLITN,
complexity,
"usages of `str::splitn` that can be replaced with `str::split`"
@ -2131,7 +2131,7 @@
/// foo(&path.to_string_lossy());
/// fn foo(s: &str) {}
/// ```
#[clippy::version = "1.58.0"]
#[clippy::version = "1.59.0"]
pub UNNECESSARY_TO_OWNED,
perf,
"unnecessary calls to `to_owned`-like functions"

View File

@ -56,7 +56,7 @@
/// -1
/// };
/// ```
#[clippy::version = "1.58.0"]
#[clippy::version = "1.59.0"]
pub NEEDLESS_LATE_INIT,
style,
"late initializations that can be replaced by a `let` statement with an initializer"

View File

@ -42,7 +42,7 @@
/// let one = "\x1b[1mWill this be bold?\x1b[0m";
/// let two = "\x0033\x00";
/// ```
#[clippy::version = "1.58.0"]
#[clippy::version = "1.59.0"]
pub OCTAL_ESCAPES,
suspicious,
"string escape sequences looking like octal characters"

View File

@ -87,7 +87,7 @@
/// # print!("{}", f(1));
/// # }
/// ```
#[clippy::version = "1.60.0"]
#[clippy::version = "1.61.0"]
pub ONLY_USED_IN_RECURSION,
nursery,
"arguments that is only used in recursion can be removed"

View File

@ -60,7 +60,7 @@
/// let vec = vec![1, 2, 3];
/// let slice = &*vec;
/// ```
#[clippy::version = "1.60.0"]
#[clippy::version = "1.61.0"]
pub DEREF_BY_SLICING,
restriction,
"slicing instead of dereferencing"

View File

@ -33,7 +33,7 @@
/// source: &'src str,
/// }
/// ```
#[clippy::version = "1.59.0"]
#[clippy::version = "1.60.0"]
pub SINGLE_CHAR_LIFETIME_NAMES,
restriction,
"warns against single-character lifetime names"