2022-10-01 09:02:57 -05:00
|
|
|
error: unchecked subtraction of a 'Duration' from an 'Instant'
|
2022-11-08 03:22:58 -06:00
|
|
|
--> $DIR/unchecked_duration_subtraction.rs:10:13
|
2022-10-01 09:02:57 -05:00
|
|
|
|
|
|
|
|
LL | let _ = _first - second;
|
|
|
|
| ^^^^^^^^^^^^^^^ help: try: `_first.checked_sub(second).unwrap();`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::unchecked-duration-subtraction` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: unchecked subtraction of a 'Duration' from an 'Instant'
|
2022-11-08 03:22:58 -06:00
|
|
|
--> $DIR/unchecked_duration_subtraction.rs:12:13
|
2022-10-01 09:02:57 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Instant::now() - Duration::from_secs(5);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Instant::now().checked_sub(Duration::from_secs(5)).unwrap();`
|
|
|
|
|
|
|
|
error: unchecked subtraction of a 'Duration' from an 'Instant'
|
2022-11-08 03:22:58 -06:00
|
|
|
--> $DIR/unchecked_duration_subtraction.rs:14:13
|
2022-10-01 09:02:57 -05:00
|
|
|
|
|
|
|
|
LL | let _ = _first - Duration::from_secs(5);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `_first.checked_sub(Duration::from_secs(5)).unwrap();`
|
|
|
|
|
|
|
|
error: unchecked subtraction of a 'Duration' from an 'Instant'
|
2022-11-08 03:22:58 -06:00
|
|
|
--> $DIR/unchecked_duration_subtraction.rs:16:13
|
2022-10-01 09:02:57 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Instant::now() - second;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Instant::now().checked_sub(second).unwrap();`
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|