2022-08-11 17:42:16 +00:00
|
|
|
error: manual implementation of `Instant::elapsed`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/manual_instant_elapsed.rs:17:20
|
2022-08-11 17:42:16 +00:00
|
|
|
|
|
|
|
|
LL | let duration = Instant::now() - prev_instant;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `prev_instant.elapsed()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-instant-elapsed` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_instant_elapsed)]`
|
2022-08-11 17:42:16 +00:00
|
|
|
|
|
|
|
error: manual implementation of `Instant::elapsed`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/manual_instant_elapsed.rs:26:5
|
2022-08-11 17:42:16 +00:00
|
|
|
|
|
|
|
|
LL | Instant::now() - *ref_to_instant; // to ensure parens are added correctly
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*ref_to_instant).elapsed()`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|