diff --git a/clippy_lints/src/duration_subsec.rs b/clippy_lints/src/duration_subsec.rs index de75276ada7..fced237b66f 100644 --- a/clippy_lints/src/duration_subsec.rs +++ b/clippy_lints/src/duration_subsec.rs @@ -20,9 +20,9 @@ use crate::utils::{match_type, snippet, span_lint_and_sugg, walk_ptrs_ty}; /// let _micros = dur.subsec_nanos() / 1_000; /// let _millis = dur.subsec_nanos() / 1_000_000; /// ``` -declare_lint! { +declare_clippy_lint! { pub DURATION_SUBSEC, - Warn, + complexity, "checks for `dur.subsec_nanos() / 1_000` or `dur.subsec_nanos() / 1_000_000`" } diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 8188dd87836..553a41c066c 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -789,6 +789,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) { cyclomatic_complexity::CYCLOMATIC_COMPLEXITY, double_comparison::DOUBLE_COMPARISONS, double_parens::DOUBLE_PARENS, + duration_subsec::DURATION_SUBSEC, eval_order_dependence::DIVERGING_SUB_EXPRESSION, eval_order_dependence::EVAL_ORDER_DEPENDENCE, explicit_write::EXPLICIT_WRITE,