mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
5b0d727bad
feat: lint unchecked subtraction of a 'Duration' from an 'Instant' Hello all, I tried to tackle the open issue #9371 and this is what I came up with. I have a difficulty currently - some tests are failing: ``` failures: [ui] ui/manual_instant_elapsed.rs ``` The `manual_instant_elapsed` is failing because of `Instant::now() - duration` test, this now gets also picked by `unchecked_duration_subtraction` lint. What is the correct way to proceed in this case? Simply update the `.stderr` file for `manual_instant_elapsed` lint? changelog: [`unchecked_duration_subtraction`]: Add lint for unchecked subtraction of a `Duration` from an `Instant`. fixes #9371 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
foo.txt | ||
README.md |