mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
run cargo dev fmt and fix overly long line
This commit is contained in:
parent
431924ccf6
commit
668b7474b4
@ -1,6 +1,7 @@
|
|||||||
use crate::utils::paths;
|
use crate::utils::paths;
|
||||||
use crate::utils::{
|
use crate::utils::{
|
||||||
get_trait_def_id, is_automatically_derived, is_copy, match_path, span_lint_and_help, span_lint_and_note, span_lint_and_then,
|
get_trait_def_id, is_automatically_derived, is_copy, match_path, span_lint_and_help, span_lint_and_note,
|
||||||
|
span_lint_and_then,
|
||||||
};
|
};
|
||||||
use if_chain::if_chain;
|
use if_chain::if_chain;
|
||||||
use rustc_hir::def_id::DefId;
|
use rustc_hir::def_id::DefId;
|
||||||
@ -154,7 +155,12 @@ declare_clippy_lint! {
|
|||||||
"deriving `serde::Deserialize` on a type that has methods using `unsafe`"
|
"deriving `serde::Deserialize` on a type that has methods using `unsafe`"
|
||||||
}
|
}
|
||||||
|
|
||||||
declare_lint_pass!(Derive => [EXPL_IMPL_CLONE_ON_COPY, DERIVE_HASH_XOR_EQ, DERIVE_ORD_XOR_PARTIAL_ORD, UNSAFE_DERIVE_DESERIALIZE]);
|
declare_lint_pass!(Derive => [
|
||||||
|
EXPL_IMPL_CLONE_ON_COPY,
|
||||||
|
DERIVE_HASH_XOR_EQ,
|
||||||
|
DERIVE_ORD_XOR_PARTIAL_ORD,
|
||||||
|
UNSAFE_DERIVE_DESERIALIZE
|
||||||
|
]);
|
||||||
|
|
||||||
impl<'tcx> LateLintPass<'tcx> for Derive {
|
impl<'tcx> LateLintPass<'tcx> for Derive {
|
||||||
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
|
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
|
||||||
|
@ -65,4 +65,4 @@ mod use_ord {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
Loading…
Reference in New Issue
Block a user