1- error: unchecked subtraction of a ' Duration' from an 'Instant'
1+ error: unchecked subtraction of a ` Duration`
22 --> tests/ui/unchecked_time_subtraction.rs:9:13
33 |
44LL | let _ = _first - second;
@@ -7,43 +7,43 @@ LL | let _ = _first - second;
77 = note: `-D clippy::unchecked-time-subtraction` implied by `-D warnings`
88 = help: to override `-D warnings` add `#[allow(clippy::unchecked_time_subtraction)]`
99
10- error: unchecked subtraction of a ' Duration' from an 'Instant'
10+ error: unchecked subtraction of a ` Duration`
1111 --> tests/ui/unchecked_time_subtraction.rs:12:13
1212 |
1313LL | let _ = Instant::now() - Duration::from_secs(5);
1414 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Instant::now().checked_sub(Duration::from_secs(5)).unwrap()`
1515
16- error: unchecked subtraction of a ' Duration' from an 'Instant'
16+ error: unchecked subtraction of a ` Duration`
1717 --> tests/ui/unchecked_time_subtraction.rs:15:13
1818 |
1919LL | let _ = _first - Duration::from_secs(5);
2020 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `_first.checked_sub(Duration::from_secs(5)).unwrap()`
2121
22- error: unchecked subtraction of a ' Duration' from an 'Instant'
22+ error: unchecked subtraction of a ` Duration`
2323 --> tests/ui/unchecked_time_subtraction.rs:18:13
2424 |
2525LL | let _ = Instant::now() - second;
2626 | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Instant::now().checked_sub(second).unwrap()`
2727
28- error: unchecked subtraction between 'Duration' values
28+ error: unchecked subtraction of a `Duration`
2929 --> tests/ui/unchecked_time_subtraction.rs:25:13
3030 |
3131LL | let _ = dur1 - dur2;
3232 | ^^^^^^^^^^^ help: try: `dur1.checked_sub(dur2).unwrap()`
3333
34- error: unchecked subtraction between 'Duration' values
34+ error: unchecked subtraction of a `Duration`
3535 --> tests/ui/unchecked_time_subtraction.rs:28:13
3636 |
3737LL | let _ = Duration::from_secs(10) - Duration::from_secs(5);
3838 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Duration::from_secs(10).checked_sub(Duration::from_secs(5)).unwrap()`
3939
40- error: unchecked subtraction between 'Duration' values
40+ error: unchecked subtraction of a `Duration`
4141 --> tests/ui/unchecked_time_subtraction.rs:31:13
4242 |
4343LL | let _ = second - dur1;
4444 | ^^^^^^^^^^^^^ help: try: `second.checked_sub(dur1).unwrap()`
4545
46- error: unchecked subtraction between 'Duration' values
46+ error: unchecked subtraction of a `Duration`
4747 --> tests/ui/unchecked_time_subtraction.rs:35:13
4848 |
4949LL | let _ = 2 * dur1 - dur2;
0 commit comments