File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11// run-rustfix
22#![warn(clippy::manual_instant_elapsed)]
33#![allow(clippy::unnecessary_operation)]
4+ #![allow(clippy::unchecked_duration_subtraction)]
45#![allow(unused_variables)]
56#![allow(unused_must_use)]
67
Original file line number Diff line number Diff line change 11// run-rustfix
22#![ warn( clippy:: manual_instant_elapsed) ]
33#![ allow( clippy:: unnecessary_operation) ]
4+ #![ allow( clippy:: unchecked_duration_subtraction) ]
45#![ allow( unused_variables) ]
56#![ allow( unused_must_use) ]
67
Original file line number Diff line number Diff line change 11error: manual implementation of `Instant::elapsed`
2- --> $DIR/manual_instant_elapsed.rs:17 :20
2+ --> $DIR/manual_instant_elapsed.rs:18 :20
33 |
44LL | let duration = Instant::now() - prev_instant;
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `prev_instant.elapsed()`
66 |
77 = note: `-D clippy::manual-instant-elapsed` implied by `-D warnings`
88
99error: manual implementation of `Instant::elapsed`
10- --> $DIR/manual_instant_elapsed.rs:26 :5
10+ --> $DIR/manual_instant_elapsed.rs:27 :5
1111 |
1212LL | Instant::now() - *ref_to_instant; // to ensure parens are added correctly
1313 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*ref_to_instant).elapsed()`
You can’t perform that action at this time.
0 commit comments