2022-10-01 14:02:57 +00:00
|
|
|
error: unchecked subtraction of a 'Duration' from an 'Instant'
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/unchecked_duration_subtraction.rs:9:13
|
2022-10-01 14:02:57 +00:00
|
|
|
|
|
|
|
|
LL | let _ = _first - second;
|
2022-11-08 14:04:32 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ help: try: `_first.checked_sub(second).unwrap()`
|
2022-10-01 14:02:57 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::unchecked-duration-subtraction` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: unchecked subtraction of a 'Duration' from an 'Instant'
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/unchecked_duration_subtraction.rs:11:13
|
2022-10-01 14:02:57 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Instant::now() - Duration::from_secs(5);
|
2022-11-08 14:04:32 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Instant::now().checked_sub(Duration::from_secs(5)).unwrap()`
|
2022-10-01 14:02:57 +00:00
|
|
|
|
|
|
|
error: unchecked subtraction of a 'Duration' from an 'Instant'
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/unchecked_duration_subtraction.rs:13:13
|
2022-10-01 14:02:57 +00:00
|
|
|
|
|
|
|
|
LL | let _ = _first - Duration::from_secs(5);
|
2022-11-08 14:04:32 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `_first.checked_sub(Duration::from_secs(5)).unwrap()`
|
2022-10-01 14:02:57 +00:00
|
|
|
|
|
|
|
error: unchecked subtraction of a 'Duration' from an 'Instant'
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/unchecked_duration_subtraction.rs:15:13
|
2022-10-01 14:02:57 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Instant::now() - second;
|
2022-11-08 14:04:32 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Instant::now().checked_sub(second).unwrap()`
|
2022-10-01 14:02:57 +00:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|