rust/tests
bors 5b0d727bad 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
2022-11-15 06:09:10 +00:00
..
test_utils Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
ui Auto merge of #9570 - nfejzic:lint-unchecked-duration-subtraction, r=llogiq 2022-11-15 06:09:10 +00:00
ui-cargo [use_self] fix suggestion when full path to struct was given 2022-10-26 18:30:32 +02:00
ui-internal Fix adjacent code 2022-10-15 07:03:29 -04:00
ui-toml fix vec-box-size-threshold off-by-one error 2022-11-14 16:06:21 +01:00
workspace_test Merge commit '97a5daa659' into clippyup 2022-01-13 13:18:19 +01:00
check-fmt.rs Merge commit 'f51aade56f' into clippyup 2022-08-31 09:24:45 -04:00
clippy.toml
compile-test.rs Fix adjacent code 2022-10-07 05:07:44 -04:00
dogfood.rs Add lintcheck to packages linted by dogfood test 2022-10-22 07:37:10 -04:00
integration.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
lint_message_convention.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
missing-test-files.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
versioncheck.rs Generate lint categories and explanations with declare_clippy_lint 2022-10-23 20:32:26 +00:00
workspace.rs Merge commit 'f51aade56f' into clippyup 2022-08-31 09:24:45 -04:00