about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/manual_instant_elapsed.stderr
blob: e84f3126f70704743861ff856295efe6331532d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
error: manual implementation of `Instant::elapsed`
  --> tests/ui/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`
  --> tests/ui/manual_instant_elapsed.rs:27: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