mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
duration_subsec: fix declaration; correctly classify
This commit is contained in:
parent
7b2fa2077f
commit
b0d364cb3e
2 changed files with 3 additions and 2 deletions
|
@ -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`"
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue