Skip to content

Commit d0874f8

Browse files
committed
Implement Duration - Duration
1 parent cfe983e commit d0874f8

9 files changed

+326
-157
lines changed

clippy_lints/src/declared_lints.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,6 @@ pub static LINTS: &[&::declare_clippy_lint::LintInfo] = &[
223223
crate::inherent_to_string::INHERENT_TO_STRING_SHADOW_DISPLAY_INFO,
224224
crate::init_numbered_fields::INIT_NUMBERED_FIELDS_INFO,
225225
crate::inline_fn_without_body::INLINE_FN_WITHOUT_BODY_INFO,
226-
crate::instant_subtraction::MANUAL_INSTANT_ELAPSED_INFO,
227-
crate::instant_subtraction::UNCHECKED_TIME_SUBTRACTION_INFO,
228226
crate::int_plus_one::INT_PLUS_ONE_INFO,
229227
crate::integer_division_remainder_used::INTEGER_DIVISION_REMAINDER_USED_INFO,
230228
crate::invalid_upcast_comparisons::INVALID_UPCAST_COMPARISONS_INFO,
@@ -704,6 +702,8 @@ pub static LINTS: &[&::declare_clippy_lint::LintInfo] = &[
704702
crate::tabs_in_doc_comments::TABS_IN_DOC_COMMENTS_INFO,
705703
crate::temporary_assignment::TEMPORARY_ASSIGNMENT_INFO,
706704
crate::tests_outside_test_module::TESTS_OUTSIDE_TEST_MODULE_INFO,
705+
crate::time_subtraction::MANUAL_INSTANT_ELAPSED_INFO,
706+
crate::time_subtraction::UNCHECKED_TIME_SUBTRACTION_INFO,
707707
crate::to_digit_is_some::TO_DIGIT_IS_SOME_INFO,
708708
crate::to_string_trait_impl::TO_STRING_TRAIT_IMPL_INFO,
709709
crate::trailing_empty_array::TRAILING_EMPTY_ARRAY_INFO,

clippy_lints/src/instant_subtraction.rs

Lines changed: 0 additions & 152 deletions
This file was deleted.

clippy_lints/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ mod inherent_impl;
176176
mod inherent_to_string;
177177
mod init_numbered_fields;
178178
mod inline_fn_without_body;
179-
mod instant_subtraction;
180179
mod int_plus_one;
181180
mod integer_division_remainder_used;
182181
mod invalid_upcast_comparisons;
@@ -358,6 +357,7 @@ mod swap_ptr_to_ref;
358357
mod tabs_in_doc_comments;
359358
mod temporary_assignment;
360359
mod tests_outside_test_module;
360+
mod time_subtraction;
361361
mod to_digit_is_some;
362362
mod to_string_trait_impl;
363363
mod trailing_empty_array;
@@ -718,7 +718,7 @@ pub fn register_lint_passes(store: &mut rustc_lint::LintStore, conf: &'static Co
718718
store.register_late_pass(move |_| Box::new(manual_rotate::ManualRotate));
719719
store.register_late_pass(move |_| Box::new(operators::Operators::new(conf)));
720720
store.register_late_pass(move |_| Box::new(std_instead_of_core::StdReexports::new(conf)));
721-
store.register_late_pass(move |_| Box::new(instant_subtraction::InstantSubtraction::new(conf)));
721+
store.register_late_pass(move |_| Box::new(time_subtraction::UncheckedTimeSubtraction::new(conf)));
722722
store.register_late_pass(|_| Box::new(partialeq_to_none::PartialeqToNone));
723723
store.register_late_pass(move |_| Box::new(manual_abs_diff::ManualAbsDiff::new(conf)));
724724
store.register_late_pass(move |_| Box::new(manual_clamp::ManualClamp::new(conf)));

0 commit comments

Comments
 (0)