rust-clippy/tests/ui/manual_instant_elapsed.stderr
Federico Guerinoni 0696624ba7 Add elapsed_instant lint
Closes #8603

Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>
2022-08-01 23:39:00 +02:00

16 lines
629 B
Text

error: manual implementation of `Instant::elapsed`
--> $DIR/manual_instant_elapsed.rs:17:20
|
LL | let duration = Instant::now() - prev_instant;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `prev_instant.elapsed()`
|
= note: `-D clippy::manual-instant-elapsed` implied by `-D warnings`
error: manual implementation of `Instant::elapsed`
--> $DIR/manual_instant_elapsed.rs:26:5
|
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