duration_subsec: fix declaration; correctly classify

This commit is contained in:
Michael Wright 2018-06-09 11:04:21 +02:00
parent 7b2fa2077f
commit b0d364cb3e
2 changed files with 3 additions and 2 deletions

View File

@ -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`"
}

View File

@ -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,