|
1 | 1 | error: unchecked subtraction of 'Duration' from 'Instant' |
2 | | - --> tests/ui/unchecked_duration_subtraction.rs:10:13 |
| 2 | + --> tests/ui/unchecked_time_subtraction.rs:10:13 |
3 | 3 | | |
4 | 4 | LL | let _ = instant - duration; |
5 | 5 | | ^^^^^^^^^^^^^^^^^^ help: try: `instant.checked_sub(duration).unwrap()` |
6 | 6 | | |
7 | | - = note: `-D clippy::unchecked-duration-subtraction` implied by `-D warnings` |
8 | | - = help: to override `-D warnings` add `#[allow(clippy::unchecked_duration_subtraction)]` |
| 7 | + = note: `-D clippy::unchecked-time-subtraction` implied by `-D warnings` |
| 8 | + = help: to override `-D warnings` add `#[allow(clippy::unchecked_time_subtraction)]` |
9 | 9 |
|
10 | 10 | error: unchecked subtraction of 'Duration' from 'Instant' |
11 | | - --> tests/ui/unchecked_duration_subtraction.rs:12:13 |
| 11 | + --> tests/ui/unchecked_time_subtraction.rs:12:13 |
12 | 12 | | |
13 | 13 | LL | let _ = Instant::now() - Duration::from_secs(5); |
14 | 14 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Instant::now().checked_sub(Duration::from_secs(5)).unwrap()` |
15 | 15 |
|
16 | 16 | error: unchecked subtraction of 'Duration' from 'Instant' |
17 | | - --> tests/ui/unchecked_duration_subtraction.rs:14:13 |
| 17 | + --> tests/ui/unchecked_time_subtraction.rs:14:13 |
18 | 18 | | |
19 | 19 | LL | let _ = instant - Duration::from_secs(5); |
20 | 20 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `instant.checked_sub(Duration::from_secs(5)).unwrap()` |
21 | 21 |
|
22 | 22 | error: unchecked subtraction of 'Duration' from 'Instant' |
23 | | - --> tests/ui/unchecked_duration_subtraction.rs:16:13 |
| 23 | + --> tests/ui/unchecked_time_subtraction.rs:16:13 |
24 | 24 | | |
25 | 25 | LL | let _ = Instant::now() - duration; |
26 | 26 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Instant::now().checked_sub(duration).unwrap()` |
27 | 27 |
|
28 | 28 | error: unchecked subtraction of 'Duration' from 'Duration' |
29 | | - --> tests/ui/unchecked_duration_subtraction.rs:18:13 |
| 29 | + --> tests/ui/unchecked_time_subtraction.rs:18:13 |
30 | 30 | | |
31 | 31 | LL | let _ = Duration::from_secs(1) - duration; |
32 | 32 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Duration::from_secs(1).checked_sub(duration).unwrap()` |
33 | 33 |
|
34 | 34 | error: unchecked subtraction of 'Duration' from 'Duration' |
35 | | - --> tests/ui/unchecked_duration_subtraction.rs:20:13 |
| 35 | + --> tests/ui/unchecked_time_subtraction.rs:20:13 |
36 | 36 | | |
37 | 37 | LL | let _ = duration2 - duration; |
38 | 38 | | ^^^^^^^^^^^^^^^^^^^^ help: try: `duration2.checked_sub(duration).unwrap()` |
39 | 39 |
|
40 | 40 | error: unchecked subtraction of 'Duration' from 'Duration' |
41 | | - --> tests/ui/unchecked_duration_subtraction.rs:22:13 |
| 41 | + --> tests/ui/unchecked_time_subtraction.rs:22:13 |
42 | 42 | | |
43 | 43 | LL | let _ = Instant::now().elapsed() - duration; |
44 | 44 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Instant::now().elapsed().checked_sub(duration).unwrap()` |
|
0 commit comments