mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-22 20:53:21 +00:00
Rename incorrect_impls to non_canonical_impls, move them to warn by default
This commit is contained in:
parent
253f1c410b
commit
b99921a5e8
24 changed files with 153 additions and 139 deletions
|
@ -5206,6 +5206,8 @@ Released 2018-09-13
|
|||
[`no_effect_underscore_binding`]: https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
|
||||
[`no_mangle_with_rust_abi`]: https://rust-lang.github.io/rust-clippy/master/index.html#no_mangle_with_rust_abi
|
||||
[`non_ascii_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
|
||||
[`non_canonical_clone_impl`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl
|
||||
[`non_canonical_partial_ord_impl`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl
|
||||
[`non_minimal_cfg`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg
|
||||
[`non_octal_unix_permissions`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_octal_unix_permissions
|
||||
[`non_send_fields_in_send_ty`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_send_fields_in_send_ty
|
||||
|
|
|
@ -211,8 +211,6 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
|
|||
crate::implicit_saturating_sub::IMPLICIT_SATURATING_SUB_INFO,
|
||||
crate::implied_bounds_in_impls::IMPLIED_BOUNDS_IN_IMPLS_INFO,
|
||||
crate::inconsistent_struct_constructor::INCONSISTENT_STRUCT_CONSTRUCTOR_INFO,
|
||||
crate::incorrect_impls::INCORRECT_CLONE_IMPL_ON_COPY_TYPE_INFO,
|
||||
crate::incorrect_impls::INCORRECT_PARTIAL_ORD_IMPL_ON_ORD_TYPE_INFO,
|
||||
crate::index_refutable_slice::INDEX_REFUTABLE_SLICE_INFO,
|
||||
crate::indexing_slicing::INDEXING_SLICING_INFO,
|
||||
crate::indexing_slicing::OUT_OF_BOUNDS_INDEXING_INFO,
|
||||
|
@ -498,6 +496,8 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
|
|||
crate::no_effect::NO_EFFECT_UNDERSCORE_BINDING_INFO,
|
||||
crate::no_effect::UNNECESSARY_OPERATION_INFO,
|
||||
crate::no_mangle_with_rust_abi::NO_MANGLE_WITH_RUST_ABI_INFO,
|
||||
crate::non_canonical_impls::NON_CANONICAL_CLONE_IMPL_INFO,
|
||||
crate::non_canonical_impls::NON_CANONICAL_PARTIAL_ORD_IMPL_INFO,
|
||||
crate::non_copy_const::BORROW_INTERIOR_MUTABLE_CONST_INFO,
|
||||
crate::non_copy_const::DECLARE_INTERIOR_MUTABLE_CONST_INFO,
|
||||
crate::non_expressive_names::JUST_UNDERSCORES_AND_DIGITS_INFO,
|
||||
|
|
|
@ -154,7 +154,6 @@ mod implicit_saturating_add;
|
|||
mod implicit_saturating_sub;
|
||||
mod implied_bounds_in_impls;
|
||||
mod inconsistent_struct_constructor;
|
||||
mod incorrect_impls;
|
||||
mod index_refutable_slice;
|
||||
mod indexing_slicing;
|
||||
mod infinite_iter;
|
||||
|
@ -244,6 +243,7 @@ mod neg_multiply;
|
|||
mod new_without_default;
|
||||
mod no_effect;
|
||||
mod no_mangle_with_rust_abi;
|
||||
mod non_canonical_impls;
|
||||
mod non_copy_const;
|
||||
mod non_expressive_names;
|
||||
mod non_octal_unix_permissions;
|
||||
|
@ -1070,7 +1070,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
|
|||
avoid_breaking_exported_api,
|
||||
))
|
||||
});
|
||||
store.register_late_pass(|_| Box::new(incorrect_impls::IncorrectImpls));
|
||||
store.register_late_pass(|_| Box::new(non_canonical_impls::NonCanonicalImpls));
|
||||
store.register_late_pass(move |_| {
|
||||
Box::new(single_call_fn::SingleCallFn {
|
||||
avoid_breaking_exported_api,
|
||||
|
|
|
@ -14,11 +14,12 @@ use rustc_span::symbol::kw;
|
|||
|
||||
declare_clippy_lint! {
|
||||
/// ### What it does
|
||||
/// Checks for manual implementations of `Clone` when `Copy` is already implemented.
|
||||
/// Checks for non-canonical implementations of `Clone` when `Copy` is already implemented.
|
||||
///
|
||||
/// ### Why is this bad?
|
||||
/// If both `Clone` and `Copy` are implemented, they must agree. This is done by dereferencing
|
||||
/// `self` in `Clone`'s implementation. Anything else is incorrect.
|
||||
/// If both `Clone` and `Copy` are implemented, they must agree. This can done by dereferencing
|
||||
/// `self` in `Clone`'s implementation, which will avoid any possibility of the implementations
|
||||
/// becoming out of sync.
|
||||
///
|
||||
/// ### Example
|
||||
/// ```rust,ignore
|
||||
|
@ -47,14 +48,13 @@ declare_clippy_lint! {
|
|||
/// impl Copy for A {}
|
||||
/// ```
|
||||
#[clippy::version = "1.72.0"]
|
||||
pub INCORRECT_CLONE_IMPL_ON_COPY_TYPE,
|
||||
correctness,
|
||||
"manual implementation of `Clone` on a `Copy` type"
|
||||
pub NON_CANONICAL_CLONE_IMPL,
|
||||
suspicious,
|
||||
"non-canonical implementation of `Clone` on a `Copy` type"
|
||||
}
|
||||
declare_clippy_lint! {
|
||||
/// ### What it does
|
||||
/// Checks for manual implementations of both `PartialOrd` and `Ord` when only `Ord` is
|
||||
/// necessary.
|
||||
/// Checks for non-canonical implementations of `PartialOrd` when `Ord` is already implemented.
|
||||
///
|
||||
/// ### Why is this bad?
|
||||
/// If both `PartialOrd` and `Ord` are implemented, they must agree. This is commonly done by
|
||||
|
@ -62,11 +62,8 @@ declare_clippy_lint! {
|
|||
/// introduce an error upon refactoring.
|
||||
///
|
||||
/// ### Known issues
|
||||
/// Code that calls the `.into()` method instead will be flagged as incorrect, despite `.into()`
|
||||
/// wrapping it in `Some`.
|
||||
///
|
||||
/// ### Limitations
|
||||
/// Will not lint if `Self` and `Rhs` do not have the same type.
|
||||
/// Code that calls the `.into()` method instead will be flagged, despite `.into()` wrapping it
|
||||
/// in `Some`.
|
||||
///
|
||||
/// ### Example
|
||||
/// ```rust
|
||||
|
@ -108,13 +105,13 @@ declare_clippy_lint! {
|
|||
/// }
|
||||
/// ```
|
||||
#[clippy::version = "1.72.0"]
|
||||
pub INCORRECT_PARTIAL_ORD_IMPL_ON_ORD_TYPE,
|
||||
correctness,
|
||||
"manual implementation of `PartialOrd` when `Ord` is already implemented"
|
||||
pub NON_CANONICAL_PARTIAL_ORD_IMPL,
|
||||
suspicious,
|
||||
"non-canonical implementation of `PartialOrd` on an `Ord` type"
|
||||
}
|
||||
declare_lint_pass!(IncorrectImpls => [INCORRECT_CLONE_IMPL_ON_COPY_TYPE, INCORRECT_PARTIAL_ORD_IMPL_ON_ORD_TYPE]);
|
||||
declare_lint_pass!(NonCanonicalImpls => [NON_CANONICAL_CLONE_IMPL, NON_CANONICAL_PARTIAL_ORD_IMPL]);
|
||||
|
||||
impl LateLintPass<'_> for IncorrectImpls {
|
||||
impl LateLintPass<'_> for NonCanonicalImpls {
|
||||
#[expect(clippy::too_many_lines)]
|
||||
fn check_impl_item(&mut self, cx: &LateContext<'_>, impl_item: &ImplItem<'_>) {
|
||||
let Some(Node::Item(item)) = get_parent_node(cx.tcx, impl_item.hir_id()) else {
|
||||
|
@ -155,9 +152,9 @@ impl LateLintPass<'_> for IncorrectImpls {
|
|||
{} else {
|
||||
span_lint_and_sugg(
|
||||
cx,
|
||||
INCORRECT_CLONE_IMPL_ON_COPY_TYPE,
|
||||
NON_CANONICAL_CLONE_IMPL,
|
||||
block.span,
|
||||
"incorrect implementation of `clone` on a `Copy` type",
|
||||
"non-canonical implementation of `clone` on a `Copy` type",
|
||||
"change this to",
|
||||
"{ *self }".to_owned(),
|
||||
Applicability::MaybeIncorrect,
|
||||
|
@ -170,9 +167,9 @@ impl LateLintPass<'_> for IncorrectImpls {
|
|||
if impl_item.ident.name == sym::clone_from {
|
||||
span_lint_and_sugg(
|
||||
cx,
|
||||
INCORRECT_CLONE_IMPL_ON_COPY_TYPE,
|
||||
NON_CANONICAL_CLONE_IMPL,
|
||||
impl_item.span,
|
||||
"incorrect implementation of `clone_from` on a `Copy` type",
|
||||
"unnecessary implementation of `clone_from` on a `Copy` type",
|
||||
"remove it",
|
||||
String::new(),
|
||||
Applicability::MaybeIncorrect,
|
||||
|
@ -218,9 +215,9 @@ impl LateLintPass<'_> for IncorrectImpls {
|
|||
|
||||
span_lint_and_then(
|
||||
cx,
|
||||
INCORRECT_PARTIAL_ORD_IMPL_ON_ORD_TYPE,
|
||||
NON_CANONICAL_PARTIAL_ORD_IMPL,
|
||||
item.span,
|
||||
"incorrect implementation of `partial_cmp` on an `Ord` type",
|
||||
"non-canonical implementation of `partial_cmp` on an `Ord` type",
|
||||
|diag| {
|
||||
let [_, other] = body.params else {
|
||||
return;
|
|
@ -15,6 +15,8 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[
|
|||
("clippy::eval_order_dependence", "clippy::mixed_read_write_in_expression"),
|
||||
("clippy::identity_conversion", "clippy::useless_conversion"),
|
||||
("clippy::if_let_some_result", "clippy::match_result_ok"),
|
||||
("clippy::incorrect_clone_impl_on_copy_type", "clippy::non_canonical_clone_impl"),
|
||||
("clippy::incorrect_partial_ord_impl_on_ord_type", "clippy::non_canonical_partial_ord_impl"),
|
||||
("clippy::integer_arithmetic", "clippy::arithmetic_side_effects"),
|
||||
("clippy::logic_bug", "clippy::overly_complex_bool_expr"),
|
||||
("clippy::new_without_default_derive", "clippy::new_without_default"),
|
||||
|
@ -38,12 +40,12 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[
|
|||
("clippy::drop_bounds", "drop_bounds"),
|
||||
("clippy::drop_copy", "dropping_copy_types"),
|
||||
("clippy::drop_ref", "dropping_references"),
|
||||
("clippy::fn_null_check", "useless_ptr_null_checks"),
|
||||
("clippy::for_loop_over_option", "for_loops_over_fallibles"),
|
||||
("clippy::for_loop_over_result", "for_loops_over_fallibles"),
|
||||
("clippy::for_loops_over_fallibles", "for_loops_over_fallibles"),
|
||||
("clippy::forget_copy", "forgetting_copy_types"),
|
||||
("clippy::forget_ref", "forgetting_references"),
|
||||
("clippy::fn_null_check", "useless_ptr_null_checks"),
|
||||
("clippy::into_iter_on_array", "array_into_iter"),
|
||||
("clippy::invalid_atomic_ordering", "invalid_atomic_ordering"),
|
||||
("clippy::invalid_ref", "invalid_value"),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#![allow(clippy::needless_if)]
|
||||
#![warn(clippy::bool_comparison)]
|
||||
#![allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
|
||||
#![allow(clippy::non_canonical_partial_ord_impl)]
|
||||
|
||||
fn main() {
|
||||
let x = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#![allow(clippy::needless_if)]
|
||||
#![warn(clippy::bool_comparison)]
|
||||
#![allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
|
||||
#![allow(clippy::non_canonical_partial_ord_impl)]
|
||||
|
||||
fn main() {
|
||||
let x = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![allow(clippy::incorrect_clone_impl_on_copy_type)]
|
||||
#![allow(clippy::non_canonical_clone_impl)]
|
||||
|
||||
use std::fmt;
|
||||
use std::marker::PhantomData;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
#![allow(
|
||||
clippy::incorrect_clone_impl_on_copy_type,
|
||||
clippy::incorrect_partial_ord_impl_on_ord_type,
|
||||
dead_code
|
||||
)]
|
||||
#![allow(clippy::non_canonical_clone_impl, clippy::non_canonical_partial_ord_impl, dead_code)]
|
||||
#![warn(clippy::expl_impl_clone_on_copy)]
|
||||
|
||||
#[derive(Copy)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: you are implementing `Clone` explicitly on a `Copy` type
|
||||
--> $DIR/derive.rs:11:1
|
||||
--> $DIR/derive.rs:7:1
|
||||
|
|
||||
LL | / impl Clone for Qux {
|
||||
LL | |
|
||||
|
@ -10,7 +10,7 @@ LL | | }
|
|||
| |_^
|
||||
|
|
||||
note: consider deriving `Clone` or removing `Copy`
|
||||
--> $DIR/derive.rs:11:1
|
||||
--> $DIR/derive.rs:7:1
|
||||
|
|
||||
LL | / impl Clone for Qux {
|
||||
LL | |
|
||||
|
@ -23,7 +23,7 @@ LL | | }
|
|||
= help: to override `-D warnings` add `#[allow(clippy::expl_impl_clone_on_copy)]`
|
||||
|
||||
error: you are implementing `Clone` explicitly on a `Copy` type
|
||||
--> $DIR/derive.rs:36:1
|
||||
--> $DIR/derive.rs:32:1
|
||||
|
|
||||
LL | / impl<'a> Clone for Lt<'a> {
|
||||
LL | |
|
||||
|
@ -34,7 +34,7 @@ LL | | }
|
|||
| |_^
|
||||
|
|
||||
note: consider deriving `Clone` or removing `Copy`
|
||||
--> $DIR/derive.rs:36:1
|
||||
--> $DIR/derive.rs:32:1
|
||||
|
|
||||
LL | / impl<'a> Clone for Lt<'a> {
|
||||
LL | |
|
||||
|
@ -45,7 +45,7 @@ LL | | }
|
|||
| |_^
|
||||
|
||||
error: you are implementing `Clone` explicitly on a `Copy` type
|
||||
--> $DIR/derive.rs:48:1
|
||||
--> $DIR/derive.rs:44:1
|
||||
|
|
||||
LL | / impl Clone for BigArray {
|
||||
LL | |
|
||||
|
@ -56,7 +56,7 @@ LL | | }
|
|||
| |_^
|
||||
|
|
||||
note: consider deriving `Clone` or removing `Copy`
|
||||
--> $DIR/derive.rs:48:1
|
||||
--> $DIR/derive.rs:44:1
|
||||
|
|
||||
LL | / impl Clone for BigArray {
|
||||
LL | |
|
||||
|
@ -67,7 +67,7 @@ LL | | }
|
|||
| |_^
|
||||
|
||||
error: you are implementing `Clone` explicitly on a `Copy` type
|
||||
--> $DIR/derive.rs:60:1
|
||||
--> $DIR/derive.rs:56:1
|
||||
|
|
||||
LL | / impl Clone for FnPtr {
|
||||
LL | |
|
||||
|
@ -78,7 +78,7 @@ LL | | }
|
|||
| |_^
|
||||
|
|
||||
note: consider deriving `Clone` or removing `Copy`
|
||||
--> $DIR/derive.rs:60:1
|
||||
--> $DIR/derive.rs:56:1
|
||||
|
|
||||
LL | / impl Clone for FnPtr {
|
||||
LL | |
|
||||
|
@ -89,7 +89,7 @@ LL | | }
|
|||
| |_^
|
||||
|
||||
error: you are implementing `Clone` explicitly on a `Copy` type
|
||||
--> $DIR/derive.rs:81:1
|
||||
--> $DIR/derive.rs:77:1
|
||||
|
|
||||
LL | / impl<T: Clone> Clone for Generic2<T> {
|
||||
LL | |
|
||||
|
@ -100,7 +100,7 @@ LL | | }
|
|||
| |_^
|
||||
|
|
||||
note: consider deriving `Clone` or removing `Copy`
|
||||
--> $DIR/derive.rs:81:1
|
||||
--> $DIR/derive.rs:77:1
|
||||
|
|
||||
LL | / impl<T: Clone> Clone for Generic2<T> {
|
||||
LL | |
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#![warn(clippy::derive_ord_xor_partial_ord)]
|
||||
#![allow(clippy::unnecessary_wraps)]
|
||||
#![allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
|
||||
#![allow(clippy::non_canonical_partial_ord_impl)]
|
||||
|
||||
use std::cmp::Ordering;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: incorrect implementation of `clone` on a `Copy` type
|
||||
--> $DIR/incorrect_clone_impl_on_copy_type.rs:9:29
|
||||
error: non-canonical implementation of `clone` on a `Copy` type
|
||||
--> $DIR/non_canonical_clone_impl.rs:9:29
|
||||
|
|
||||
LL | fn clone(&self) -> Self {
|
||||
| _____________________________^
|
||||
|
@ -7,10 +7,11 @@ LL | | Self(self.0)
|
|||
LL | | }
|
||||
| |_____^ help: change this to: `{ *self }`
|
||||
|
|
||||
= note: `#[deny(clippy::incorrect_clone_impl_on_copy_type)]` on by default
|
||||
= note: `-D clippy::non-canonical-clone-impl` implied by `-D warnings`
|
||||
= help: to override `-D warnings` add `#[allow(clippy::non_canonical_clone_impl)]`
|
||||
|
||||
error: incorrect implementation of `clone_from` on a `Copy` type
|
||||
--> $DIR/incorrect_clone_impl_on_copy_type.rs:13:5
|
||||
error: unnecessary implementation of `clone_from` on a `Copy` type
|
||||
--> $DIR/non_canonical_clone_impl.rs:13:5
|
||||
|
|
||||
LL | / fn clone_from(&mut self, source: &Self) {
|
||||
LL | | source.clone();
|
||||
|
@ -18,8 +19,8 @@ LL | | *self = source.clone();
|
|||
LL | | }
|
||||
| |_____^ help: remove it
|
||||
|
||||
error: incorrect implementation of `clone` on a `Copy` type
|
||||
--> $DIR/incorrect_clone_impl_on_copy_type.rs:80:29
|
||||
error: non-canonical implementation of `clone` on a `Copy` type
|
||||
--> $DIR/non_canonical_clone_impl.rs:80:29
|
||||
|
|
||||
LL | fn clone(&self) -> Self {
|
||||
| _____________________________^
|
||||
|
@ -27,8 +28,8 @@ LL | | Self(self.0)
|
|||
LL | | }
|
||||
| |_____^ help: change this to: `{ *self }`
|
||||
|
||||
error: incorrect implementation of `clone_from` on a `Copy` type
|
||||
--> $DIR/incorrect_clone_impl_on_copy_type.rs:84:5
|
||||
error: unnecessary implementation of `clone_from` on a `Copy` type
|
||||
--> $DIR/non_canonical_clone_impl.rs:84:5
|
||||
|
|
||||
LL | / fn clone_from(&mut self, source: &Self) {
|
||||
LL | | source.clone();
|
|
@ -1,5 +1,5 @@
|
|||
error: incorrect implementation of `partial_cmp` on an `Ord` type
|
||||
--> $DIR/incorrect_partial_ord_impl_on_ord_type.rs:16:1
|
||||
error: non-canonical implementation of `partial_cmp` on an `Ord` type
|
||||
--> $DIR/non_canonical_partial_ord_impl.rs:16:1
|
||||
|
|
||||
LL | / impl PartialOrd for A {
|
||||
LL | | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||
|
@ -10,10 +10,11 @@ LL | || }
|
|||
LL | | }
|
||||
| |__^
|
||||
|
|
||||
= note: `#[deny(clippy::incorrect_partial_ord_impl_on_ord_type)]` on by default
|
||||
= note: `-D clippy::non-canonical-partial-ord-impl` implied by `-D warnings`
|
||||
= help: to override `-D warnings` add `#[allow(clippy::non_canonical_partial_ord_impl)]`
|
||||
|
||||
error: incorrect implementation of `partial_cmp` on an `Ord` type
|
||||
--> $DIR/incorrect_partial_ord_impl_on_ord_type.rs:50:1
|
||||
error: non-canonical implementation of `partial_cmp` on an `Ord` type
|
||||
--> $DIR/non_canonical_partial_ord_impl.rs:50:1
|
||||
|
|
||||
LL | / impl PartialOrd for C {
|
||||
LL | | fn partial_cmp(&self, _: &Self) -> Option<Ordering> {
|
|
@ -21,8 +21,6 @@ impl cmp::Ord for A {
|
|||
}
|
||||
|
||||
impl PartialOrd for A {
|
||||
//~^ ERROR: incorrect implementation of `partial_cmp` on an `Ord` type
|
||||
//~| NOTE: `#[deny(clippy::incorrect_partial_ord_impl_on_ord_type)]` on by default
|
||||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||
// NOTE: This suggestion is wrong, as `Ord` is not in scope. But this should be fine as it isn't
|
||||
// automatically applied
|
||||
|
@ -46,7 +44,6 @@ impl cmp::Ord for B {
|
|||
}
|
||||
|
||||
impl PartialOrd for B {
|
||||
//~^ ERROR: incorrect implementation of `partial_cmp` on an `Ord` type
|
||||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||
// This calls `B.cmp`, not `Ord::cmp`!
|
||||
Some(self.cmp(other))
|
|
@ -1,9 +1,7 @@
|
|||
error: incorrect implementation of `partial_cmp` on an `Ord` type
|
||||
--> $DIR/incorrect_partial_ord_impl_on_ord_type_fully_qual.rs:23:1
|
||||
error: non-canonical implementation of `partial_cmp` on an `Ord` type
|
||||
--> $DIR/non_canonical_partial_ord_impl_fully_qual.rs:23:1
|
||||
|
|
||||
LL | / impl PartialOrd for A {
|
||||
LL | |
|
||||
LL | |
|
||||
LL | | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||
| | _____________________________________________________________-
|
||||
LL | || // NOTE: This suggestion is wrong, as `Ord` is not in scope. But this should be fine as it isn't
|
||||
|
@ -14,13 +12,13 @@ LL | || }
|
|||
LL | | }
|
||||
| |__^
|
||||
|
|
||||
= note: `#[deny(clippy::incorrect_partial_ord_impl_on_ord_type)]` on by default
|
||||
= note: `-D clippy::non-canonical-partial-ord-impl` implied by `-D warnings`
|
||||
= help: to override `-D warnings` add `#[allow(clippy::non_canonical_partial_ord_impl)]`
|
||||
|
||||
error: incorrect implementation of `partial_cmp` on an `Ord` type
|
||||
--> $DIR/incorrect_partial_ord_impl_on_ord_type_fully_qual.rs:48:1
|
||||
error: non-canonical implementation of `partial_cmp` on an `Ord` type
|
||||
--> $DIR/non_canonical_partial_ord_impl_fully_qual.rs:46:1
|
||||
|
|
||||
LL | / impl PartialOrd for B {
|
||||
LL | |
|
||||
LL | | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||
| | _____________________________________________________________-
|
||||
LL | || // This calls `B.cmp`, not `Ord::cmp`!
|
|
@ -14,6 +14,8 @@
|
|||
#![allow(clippy::mixed_read_write_in_expression)]
|
||||
#![allow(clippy::useless_conversion)]
|
||||
#![allow(clippy::match_result_ok)]
|
||||
#![allow(clippy::non_canonical_clone_impl)]
|
||||
#![allow(clippy::non_canonical_partial_ord_impl)]
|
||||
#![allow(clippy::arithmetic_side_effects)]
|
||||
#![allow(clippy::overly_complex_bool_expr)]
|
||||
#![allow(clippy::new_without_default)]
|
||||
|
@ -33,10 +35,10 @@
|
|||
#![allow(drop_bounds)]
|
||||
#![allow(dropping_copy_types)]
|
||||
#![allow(dropping_references)]
|
||||
#![allow(useless_ptr_null_checks)]
|
||||
#![allow(for_loops_over_fallibles)]
|
||||
#![allow(forgetting_copy_types)]
|
||||
#![allow(forgetting_references)]
|
||||
#![allow(useless_ptr_null_checks)]
|
||||
#![allow(array_into_iter)]
|
||||
#![allow(invalid_atomic_ordering)]
|
||||
#![allow(invalid_value)]
|
||||
|
@ -62,6 +64,8 @@
|
|||
#![warn(clippy::mixed_read_write_in_expression)]
|
||||
#![warn(clippy::useless_conversion)]
|
||||
#![warn(clippy::match_result_ok)]
|
||||
#![warn(clippy::non_canonical_clone_impl)]
|
||||
#![warn(clippy::non_canonical_partial_ord_impl)]
|
||||
#![warn(clippy::arithmetic_side_effects)]
|
||||
#![warn(clippy::overly_complex_bool_expr)]
|
||||
#![warn(clippy::new_without_default)]
|
||||
|
@ -85,12 +89,12 @@
|
|||
#![warn(drop_bounds)]
|
||||
#![warn(dropping_copy_types)]
|
||||
#![warn(dropping_references)]
|
||||
#![warn(useless_ptr_null_checks)]
|
||||
#![warn(for_loops_over_fallibles)]
|
||||
#![warn(for_loops_over_fallibles)]
|
||||
#![warn(for_loops_over_fallibles)]
|
||||
#![warn(forgetting_copy_types)]
|
||||
#![warn(forgetting_references)]
|
||||
#![warn(useless_ptr_null_checks)]
|
||||
#![warn(array_into_iter)]
|
||||
#![warn(invalid_atomic_ordering)]
|
||||
#![warn(invalid_value)]
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#![allow(clippy::mixed_read_write_in_expression)]
|
||||
#![allow(clippy::useless_conversion)]
|
||||
#![allow(clippy::match_result_ok)]
|
||||
#![allow(clippy::non_canonical_clone_impl)]
|
||||
#![allow(clippy::non_canonical_partial_ord_impl)]
|
||||
#![allow(clippy::arithmetic_side_effects)]
|
||||
#![allow(clippy::overly_complex_bool_expr)]
|
||||
#![allow(clippy::new_without_default)]
|
||||
|
@ -33,10 +35,10 @@
|
|||
#![allow(drop_bounds)]
|
||||
#![allow(dropping_copy_types)]
|
||||
#![allow(dropping_references)]
|
||||
#![allow(useless_ptr_null_checks)]
|
||||
#![allow(for_loops_over_fallibles)]
|
||||
#![allow(forgetting_copy_types)]
|
||||
#![allow(forgetting_references)]
|
||||
#![allow(useless_ptr_null_checks)]
|
||||
#![allow(array_into_iter)]
|
||||
#![allow(invalid_atomic_ordering)]
|
||||
#![allow(invalid_value)]
|
||||
|
@ -62,6 +64,8 @@
|
|||
#![warn(clippy::eval_order_dependence)]
|
||||
#![warn(clippy::identity_conversion)]
|
||||
#![warn(clippy::if_let_some_result)]
|
||||
#![warn(clippy::incorrect_clone_impl_on_copy_type)]
|
||||
#![warn(clippy::incorrect_partial_ord_impl_on_ord_type)]
|
||||
#![warn(clippy::integer_arithmetic)]
|
||||
#![warn(clippy::logic_bug)]
|
||||
#![warn(clippy::new_without_default_derive)]
|
||||
|
@ -85,12 +89,12 @@
|
|||
#![warn(clippy::drop_bounds)]
|
||||
#![warn(clippy::drop_copy)]
|
||||
#![warn(clippy::drop_ref)]
|
||||
#![warn(clippy::fn_null_check)]
|
||||
#![warn(clippy::for_loop_over_option)]
|
||||
#![warn(clippy::for_loop_over_result)]
|
||||
#![warn(clippy::for_loops_over_fallibles)]
|
||||
#![warn(clippy::forget_copy)]
|
||||
#![warn(clippy::forget_ref)]
|
||||
#![warn(clippy::fn_null_check)]
|
||||
#![warn(clippy::into_iter_on_array)]
|
||||
#![warn(clippy::invalid_atomic_ordering)]
|
||||
#![warn(clippy::invalid_ref)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: lint `clippy::almost_complete_letter_range` has been renamed to `clippy::almost_complete_range`
|
||||
--> $DIR/rename.rs:52:9
|
||||
--> $DIR/rename.rs:54:9
|
||||
|
|
||||
LL | #![warn(clippy::almost_complete_letter_range)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::almost_complete_range`
|
||||
|
@ -8,322 +8,334 @@ LL | #![warn(clippy::almost_complete_letter_range)]
|
|||
= help: to override `-D warnings` add `#[allow(renamed_and_removed_lints)]`
|
||||
|
||||
error: lint `clippy::blacklisted_name` has been renamed to `clippy::disallowed_names`
|
||||
--> $DIR/rename.rs:53:9
|
||||
--> $DIR/rename.rs:55:9
|
||||
|
|
||||
LL | #![warn(clippy::blacklisted_name)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::disallowed_names`
|
||||
|
||||
error: lint `clippy::block_in_if_condition_expr` has been renamed to `clippy::blocks_in_if_conditions`
|
||||
--> $DIR/rename.rs:54:9
|
||||
--> $DIR/rename.rs:56:9
|
||||
|
|
||||
LL | #![warn(clippy::block_in_if_condition_expr)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::blocks_in_if_conditions`
|
||||
|
||||
error: lint `clippy::block_in_if_condition_stmt` has been renamed to `clippy::blocks_in_if_conditions`
|
||||
--> $DIR/rename.rs:55:9
|
||||
--> $DIR/rename.rs:57:9
|
||||
|
|
||||
LL | #![warn(clippy::block_in_if_condition_stmt)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::blocks_in_if_conditions`
|
||||
|
||||
error: lint `clippy::box_vec` has been renamed to `clippy::box_collection`
|
||||
--> $DIR/rename.rs:56:9
|
||||
--> $DIR/rename.rs:58:9
|
||||
|
|
||||
LL | #![warn(clippy::box_vec)]
|
||||
| ^^^^^^^^^^^^^^^ help: use the new name: `clippy::box_collection`
|
||||
|
||||
error: lint `clippy::const_static_lifetime` has been renamed to `clippy::redundant_static_lifetimes`
|
||||
--> $DIR/rename.rs:57:9
|
||||
--> $DIR/rename.rs:59:9
|
||||
|
|
||||
LL | #![warn(clippy::const_static_lifetime)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::redundant_static_lifetimes`
|
||||
|
||||
error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cognitive_complexity`
|
||||
--> $DIR/rename.rs:58:9
|
||||
--> $DIR/rename.rs:60:9
|
||||
|
|
||||
LL | #![warn(clippy::cyclomatic_complexity)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
|
||||
|
||||
error: lint `clippy::derive_hash_xor_eq` has been renamed to `clippy::derived_hash_with_manual_eq`
|
||||
--> $DIR/rename.rs:59:9
|
||||
--> $DIR/rename.rs:61:9
|
||||
|
|
||||
LL | #![warn(clippy::derive_hash_xor_eq)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::derived_hash_with_manual_eq`
|
||||
|
||||
error: lint `clippy::disallowed_method` has been renamed to `clippy::disallowed_methods`
|
||||
--> $DIR/rename.rs:60:9
|
||||
--> $DIR/rename.rs:62:9
|
||||
|
|
||||
LL | #![warn(clippy::disallowed_method)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::disallowed_methods`
|
||||
|
||||
error: lint `clippy::disallowed_type` has been renamed to `clippy::disallowed_types`
|
||||
--> $DIR/rename.rs:61:9
|
||||
--> $DIR/rename.rs:63:9
|
||||
|
|
||||
LL | #![warn(clippy::disallowed_type)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::disallowed_types`
|
||||
|
||||
error: lint `clippy::eval_order_dependence` has been renamed to `clippy::mixed_read_write_in_expression`
|
||||
--> $DIR/rename.rs:62:9
|
||||
--> $DIR/rename.rs:64:9
|
||||
|
|
||||
LL | #![warn(clippy::eval_order_dependence)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::mixed_read_write_in_expression`
|
||||
|
||||
error: lint `clippy::identity_conversion` has been renamed to `clippy::useless_conversion`
|
||||
--> $DIR/rename.rs:63:9
|
||||
--> $DIR/rename.rs:65:9
|
||||
|
|
||||
LL | #![warn(clippy::identity_conversion)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::useless_conversion`
|
||||
|
||||
error: lint `clippy::if_let_some_result` has been renamed to `clippy::match_result_ok`
|
||||
--> $DIR/rename.rs:64:9
|
||||
--> $DIR/rename.rs:66:9
|
||||
|
|
||||
LL | #![warn(clippy::if_let_some_result)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::match_result_ok`
|
||||
|
||||
error: lint `clippy::incorrect_clone_impl_on_copy_type` has been renamed to `clippy::non_canonical_clone_impl`
|
||||
--> $DIR/rename.rs:67:9
|
||||
|
|
||||
LL | #![warn(clippy::incorrect_clone_impl_on_copy_type)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::non_canonical_clone_impl`
|
||||
|
||||
error: lint `clippy::incorrect_partial_ord_impl_on_ord_type` has been renamed to `clippy::non_canonical_partial_ord_impl`
|
||||
--> $DIR/rename.rs:68:9
|
||||
|
|
||||
LL | #![warn(clippy::incorrect_partial_ord_impl_on_ord_type)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::non_canonical_partial_ord_impl`
|
||||
|
||||
error: lint `clippy::integer_arithmetic` has been renamed to `clippy::arithmetic_side_effects`
|
||||
--> $DIR/rename.rs:65:9
|
||||
--> $DIR/rename.rs:69:9
|
||||
|
|
||||
LL | #![warn(clippy::integer_arithmetic)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::arithmetic_side_effects`
|
||||
|
||||
error: lint `clippy::logic_bug` has been renamed to `clippy::overly_complex_bool_expr`
|
||||
--> $DIR/rename.rs:66:9
|
||||
--> $DIR/rename.rs:70:9
|
||||
|
|
||||
LL | #![warn(clippy::logic_bug)]
|
||||
| ^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::overly_complex_bool_expr`
|
||||
|
||||
error: lint `clippy::new_without_default_derive` has been renamed to `clippy::new_without_default`
|
||||
--> $DIR/rename.rs:67:9
|
||||
--> $DIR/rename.rs:71:9
|
||||
|
|
||||
LL | #![warn(clippy::new_without_default_derive)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::new_without_default`
|
||||
|
||||
error: lint `clippy::option_and_then_some` has been renamed to `clippy::bind_instead_of_map`
|
||||
--> $DIR/rename.rs:68:9
|
||||
--> $DIR/rename.rs:72:9
|
||||
|
|
||||
LL | #![warn(clippy::option_and_then_some)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::bind_instead_of_map`
|
||||
|
||||
error: lint `clippy::option_expect_used` has been renamed to `clippy::expect_used`
|
||||
--> $DIR/rename.rs:69:9
|
||||
--> $DIR/rename.rs:73:9
|
||||
|
|
||||
LL | #![warn(clippy::option_expect_used)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::expect_used`
|
||||
|
||||
error: lint `clippy::option_map_unwrap_or` has been renamed to `clippy::map_unwrap_or`
|
||||
--> $DIR/rename.rs:70:9
|
||||
--> $DIR/rename.rs:74:9
|
||||
|
|
||||
LL | #![warn(clippy::option_map_unwrap_or)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or`
|
||||
|
||||
error: lint `clippy::option_map_unwrap_or_else` has been renamed to `clippy::map_unwrap_or`
|
||||
--> $DIR/rename.rs:71:9
|
||||
--> $DIR/rename.rs:75:9
|
||||
|
|
||||
LL | #![warn(clippy::option_map_unwrap_or_else)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or`
|
||||
|
||||
error: lint `clippy::option_unwrap_used` has been renamed to `clippy::unwrap_used`
|
||||
--> $DIR/rename.rs:72:9
|
||||
--> $DIR/rename.rs:76:9
|
||||
|
|
||||
LL | #![warn(clippy::option_unwrap_used)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::unwrap_used`
|
||||
|
||||
error: lint `clippy::ref_in_deref` has been renamed to `clippy::needless_borrow`
|
||||
--> $DIR/rename.rs:73:9
|
||||
--> $DIR/rename.rs:77:9
|
||||
|
|
||||
LL | #![warn(clippy::ref_in_deref)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::needless_borrow`
|
||||
|
||||
error: lint `clippy::result_expect_used` has been renamed to `clippy::expect_used`
|
||||
--> $DIR/rename.rs:74:9
|
||||
--> $DIR/rename.rs:78:9
|
||||
|
|
||||
LL | #![warn(clippy::result_expect_used)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::expect_used`
|
||||
|
||||
error: lint `clippy::result_map_unwrap_or_else` has been renamed to `clippy::map_unwrap_or`
|
||||
--> $DIR/rename.rs:75:9
|
||||
--> $DIR/rename.rs:79:9
|
||||
|
|
||||
LL | #![warn(clippy::result_map_unwrap_or_else)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::map_unwrap_or`
|
||||
|
||||
error: lint `clippy::result_unwrap_used` has been renamed to `clippy::unwrap_used`
|
||||
--> $DIR/rename.rs:76:9
|
||||
--> $DIR/rename.rs:80:9
|
||||
|
|
||||
LL | #![warn(clippy::result_unwrap_used)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::unwrap_used`
|
||||
|
||||
error: lint `clippy::single_char_push_str` has been renamed to `clippy::single_char_add_str`
|
||||
--> $DIR/rename.rs:77:9
|
||||
--> $DIR/rename.rs:81:9
|
||||
|
|
||||
LL | #![warn(clippy::single_char_push_str)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::single_char_add_str`
|
||||
|
||||
error: lint `clippy::stutter` has been renamed to `clippy::module_name_repetitions`
|
||||
--> $DIR/rename.rs:78:9
|
||||
--> $DIR/rename.rs:82:9
|
||||
|
|
||||
LL | #![warn(clippy::stutter)]
|
||||
| ^^^^^^^^^^^^^^^ help: use the new name: `clippy::module_name_repetitions`
|
||||
|
||||
error: lint `clippy::to_string_in_display` has been renamed to `clippy::recursive_format_impl`
|
||||
--> $DIR/rename.rs:79:9
|
||||
--> $DIR/rename.rs:83:9
|
||||
|
|
||||
LL | #![warn(clippy::to_string_in_display)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::recursive_format_impl`
|
||||
|
||||
error: lint `clippy::unwrap_or_else_default` has been renamed to `clippy::unwrap_or_default`
|
||||
--> $DIR/rename.rs:80:9
|
||||
--> $DIR/rename.rs:84:9
|
||||
|
|
||||
LL | #![warn(clippy::unwrap_or_else_default)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::unwrap_or_default`
|
||||
|
||||
error: lint `clippy::zero_width_space` has been renamed to `clippy::invisible_characters`
|
||||
--> $DIR/rename.rs:81:9
|
||||
--> $DIR/rename.rs:85:9
|
||||
|
|
||||
LL | #![warn(clippy::zero_width_space)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::invisible_characters`
|
||||
|
||||
error: lint `clippy::cast_ref_to_mut` has been renamed to `invalid_reference_casting`
|
||||
--> $DIR/rename.rs:82:9
|
||||
--> $DIR/rename.rs:86:9
|
||||
|
|
||||
LL | #![warn(clippy::cast_ref_to_mut)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `invalid_reference_casting`
|
||||
|
||||
error: lint `clippy::clone_double_ref` has been renamed to `suspicious_double_ref_op`
|
||||
--> $DIR/rename.rs:83:9
|
||||
--> $DIR/rename.rs:87:9
|
||||
|
|
||||
LL | #![warn(clippy::clone_double_ref)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `suspicious_double_ref_op`
|
||||
|
||||
error: lint `clippy::cmp_nan` has been renamed to `invalid_nan_comparisons`
|
||||
--> $DIR/rename.rs:84:9
|
||||
--> $DIR/rename.rs:88:9
|
||||
|
|
||||
LL | #![warn(clippy::cmp_nan)]
|
||||
| ^^^^^^^^^^^^^^^ help: use the new name: `invalid_nan_comparisons`
|
||||
|
||||
error: lint `clippy::drop_bounds` has been renamed to `drop_bounds`
|
||||
--> $DIR/rename.rs:85:9
|
||||
--> $DIR/rename.rs:89:9
|
||||
|
|
||||
LL | #![warn(clippy::drop_bounds)]
|
||||
| ^^^^^^^^^^^^^^^^^^^ help: use the new name: `drop_bounds`
|
||||
|
||||
error: lint `clippy::drop_copy` has been renamed to `dropping_copy_types`
|
||||
--> $DIR/rename.rs:86:9
|
||||
--> $DIR/rename.rs:90:9
|
||||
|
|
||||
LL | #![warn(clippy::drop_copy)]
|
||||
| ^^^^^^^^^^^^^^^^^ help: use the new name: `dropping_copy_types`
|
||||
|
||||
error: lint `clippy::drop_ref` has been renamed to `dropping_references`
|
||||
--> $DIR/rename.rs:87:9
|
||||
--> $DIR/rename.rs:91:9
|
||||
|
|
||||
LL | #![warn(clippy::drop_ref)]
|
||||
| ^^^^^^^^^^^^^^^^ help: use the new name: `dropping_references`
|
||||
|
||||
error: lint `clippy::fn_null_check` has been renamed to `useless_ptr_null_checks`
|
||||
--> $DIR/rename.rs:92:9
|
||||
|
|
||||
LL | #![warn(clippy::fn_null_check)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `useless_ptr_null_checks`
|
||||
|
||||
error: lint `clippy::for_loop_over_option` has been renamed to `for_loops_over_fallibles`
|
||||
--> $DIR/rename.rs:88:9
|
||||
--> $DIR/rename.rs:93:9
|
||||
|
|
||||
LL | #![warn(clippy::for_loop_over_option)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `for_loops_over_fallibles`
|
||||
|
||||
error: lint `clippy::for_loop_over_result` has been renamed to `for_loops_over_fallibles`
|
||||
--> $DIR/rename.rs:89:9
|
||||
--> $DIR/rename.rs:94:9
|
||||
|
|
||||
LL | #![warn(clippy::for_loop_over_result)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `for_loops_over_fallibles`
|
||||
|
||||
error: lint `clippy::for_loops_over_fallibles` has been renamed to `for_loops_over_fallibles`
|
||||
--> $DIR/rename.rs:90:9
|
||||
--> $DIR/rename.rs:95:9
|
||||
|
|
||||
LL | #![warn(clippy::for_loops_over_fallibles)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `for_loops_over_fallibles`
|
||||
|
||||
error: lint `clippy::forget_copy` has been renamed to `forgetting_copy_types`
|
||||
--> $DIR/rename.rs:91:9
|
||||
--> $DIR/rename.rs:96:9
|
||||
|
|
||||
LL | #![warn(clippy::forget_copy)]
|
||||
| ^^^^^^^^^^^^^^^^^^^ help: use the new name: `forgetting_copy_types`
|
||||
|
||||
error: lint `clippy::forget_ref` has been renamed to `forgetting_references`
|
||||
--> $DIR/rename.rs:92:9
|
||||
--> $DIR/rename.rs:97:9
|
||||
|
|
||||
LL | #![warn(clippy::forget_ref)]
|
||||
| ^^^^^^^^^^^^^^^^^^ help: use the new name: `forgetting_references`
|
||||
|
||||
error: lint `clippy::fn_null_check` has been renamed to `useless_ptr_null_checks`
|
||||
--> $DIR/rename.rs:93:9
|
||||
|
|
||||
LL | #![warn(clippy::fn_null_check)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `useless_ptr_null_checks`
|
||||
|
||||
error: lint `clippy::into_iter_on_array` has been renamed to `array_into_iter`
|
||||
--> $DIR/rename.rs:94:9
|
||||
--> $DIR/rename.rs:98:9
|
||||
|
|
||||
LL | #![warn(clippy::into_iter_on_array)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `array_into_iter`
|
||||
|
||||
error: lint `clippy::invalid_atomic_ordering` has been renamed to `invalid_atomic_ordering`
|
||||
--> $DIR/rename.rs:95:9
|
||||
--> $DIR/rename.rs:99:9
|
||||
|
|
||||
LL | #![warn(clippy::invalid_atomic_ordering)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `invalid_atomic_ordering`
|
||||
|
||||
error: lint `clippy::invalid_ref` has been renamed to `invalid_value`
|
||||
--> $DIR/rename.rs:96:9
|
||||
--> $DIR/rename.rs:100:9
|
||||
|
|
||||
LL | #![warn(clippy::invalid_ref)]
|
||||
| ^^^^^^^^^^^^^^^^^^^ help: use the new name: `invalid_value`
|
||||
|
||||
error: lint `clippy::invalid_utf8_in_unchecked` has been renamed to `invalid_from_utf8_unchecked`
|
||||
--> $DIR/rename.rs:97:9
|
||||
--> $DIR/rename.rs:101:9
|
||||
|
|
||||
LL | #![warn(clippy::invalid_utf8_in_unchecked)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `invalid_from_utf8_unchecked`
|
||||
|
||||
error: lint `clippy::let_underscore_drop` has been renamed to `let_underscore_drop`
|
||||
--> $DIR/rename.rs:98:9
|
||||
--> $DIR/rename.rs:102:9
|
||||
|
|
||||
LL | #![warn(clippy::let_underscore_drop)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `let_underscore_drop`
|
||||
|
||||
error: lint `clippy::mem_discriminant_non_enum` has been renamed to `enum_intrinsics_non_enums`
|
||||
--> $DIR/rename.rs:99:9
|
||||
--> $DIR/rename.rs:103:9
|
||||
|
|
||||
LL | #![warn(clippy::mem_discriminant_non_enum)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `enum_intrinsics_non_enums`
|
||||
|
||||
error: lint `clippy::panic_params` has been renamed to `non_fmt_panics`
|
||||
--> $DIR/rename.rs:100:9
|
||||
--> $DIR/rename.rs:104:9
|
||||
|
|
||||
LL | #![warn(clippy::panic_params)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^ help: use the new name: `non_fmt_panics`
|
||||
|
||||
error: lint `clippy::positional_named_format_parameters` has been renamed to `named_arguments_used_positionally`
|
||||
--> $DIR/rename.rs:101:9
|
||||
--> $DIR/rename.rs:105:9
|
||||
|
|
||||
LL | #![warn(clippy::positional_named_format_parameters)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `named_arguments_used_positionally`
|
||||
|
||||
error: lint `clippy::temporary_cstring_as_ptr` has been renamed to `temporary_cstring_as_ptr`
|
||||
--> $DIR/rename.rs:102:9
|
||||
--> $DIR/rename.rs:106:9
|
||||
|
|
||||
LL | #![warn(clippy::temporary_cstring_as_ptr)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `temporary_cstring_as_ptr`
|
||||
|
||||
error: lint `clippy::undropped_manually_drops` has been renamed to `undropped_manually_drops`
|
||||
--> $DIR/rename.rs:103:9
|
||||
--> $DIR/rename.rs:107:9
|
||||
|
|
||||
LL | #![warn(clippy::undropped_manually_drops)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `undropped_manually_drops`
|
||||
|
||||
error: lint `clippy::unknown_clippy_lints` has been renamed to `unknown_lints`
|
||||
--> $DIR/rename.rs:104:9
|
||||
--> $DIR/rename.rs:108:9
|
||||
|
|
||||
LL | #![warn(clippy::unknown_clippy_lints)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `unknown_lints`
|
||||
|
||||
error: lint `clippy::unused_label` has been renamed to `unused_labels`
|
||||
--> $DIR/rename.rs:105:9
|
||||
--> $DIR/rename.rs:109:9
|
||||
|
|
||||
LL | #![warn(clippy::unused_label)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^ help: use the new name: `unused_labels`
|
||||
|
||||
error: aborting due to 54 previous errors
|
||||
error: aborting due to 56 previous errors
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![allow(clippy::incorrect_clone_impl_on_copy_type, unused)]
|
||||
#![allow(clippy::non_canonical_clone_impl, unused)]
|
||||
#![warn(clippy::unnecessary_struct_initialization)]
|
||||
|
||||
struct S {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![allow(clippy::incorrect_clone_impl_on_copy_type, unused)]
|
||||
#![allow(clippy::non_canonical_clone_impl, unused)]
|
||||
#![warn(clippy::unnecessary_struct_initialization)]
|
||||
|
||||
struct S {
|
||||
|
|
Loading…
Reference in a new issue