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 1
1
// run-rustfix
2
2
#![warn(clippy::manual_instant_elapsed)]
3
3
#![allow(clippy::unnecessary_operation)]
4
+ #![allow(clippy::unchecked_duration_subtraction)]
4
5
#![allow(unused_variables)]
5
6
#![allow(unused_must_use)]
6
7
Original file line number Diff line number Diff line change 1
1
// run-rustfix
2
2
#![ warn( clippy:: manual_instant_elapsed) ]
3
3
#![ allow( clippy:: unnecessary_operation) ]
4
+ #![ allow( clippy:: unchecked_duration_subtraction) ]
4
5
#![ allow( unused_variables) ]
5
6
#![ allow( unused_must_use) ]
6
7
Original file line number Diff line number Diff line change 1
1
error: manual implementation of `Instant::elapsed`
2
- --> $DIR/manual_instant_elapsed.rs:17 :20
2
+ --> $DIR/manual_instant_elapsed.rs:18 :20
3
3
|
4
4
LL | let duration = Instant::now() - prev_instant;
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `prev_instant.elapsed()`
6
6
|
7
7
= note: `-D clippy::manual-instant-elapsed` implied by `-D warnings`
8
8
9
9
error: manual implementation of `Instant::elapsed`
10
- --> $DIR/manual_instant_elapsed.rs:26 :5
10
+ --> $DIR/manual_instant_elapsed.rs:27 :5
11
11
|
12
12
LL | Instant::now() - *ref_to_instant; // to ensure parens are added correctly
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*ref_to_instant).elapsed()`
You can’t perform that action at this time.
0 commit comments