mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 08:36:03 +00:00
18 lines
713 B
Plaintext
18 lines
713 B
Plaintext
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`
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_instant_elapsed)]`
|
|
|
|
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
|
|
|