about summary refs log tree commit diff
path: root/tests/rustdoc-ui/coverage/json.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-15 06:09:10 +0000
committerbors <bors@rust-lang.org>2022-11-15 06:09:10 +0000
commit5b0d727bada20ebc0ab8fe780456b29df9a475bc (patch)
tree3c779f004bc0b27e58455863f3ea64a3a9c1d5e2 /tests/rustdoc-ui/coverage/json.rs
parent3c7f74de0b6b6a23f9a057b9d27990b05a20929e (diff)
parent0dd6ce0b1931e3e5c274daf4bbf50e96a322befd (diff)
downloadrust-5b0d727bada20ebc0ab8fe780456b29df9a475bc.tar.gz
rust-5b0d727bada20ebc0ab8fe780456b29df9a475bc.zip
Auto merge of #9570 - nfejzic:lint-unchecked-duration-subtraction, r=llogiq
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
Diffstat (limited to 'tests/rustdoc-ui/coverage/json.rs')
0 files changed, 0 insertions, 0 deletions