y21
ced8bc5b8f
use span_lint_hir
instead of span_lint
in more lints
2024-03-09 17:43:04 +01:00
Oli Scherer
3d88fae050
Update ui test crate
2023-08-11 14:02:28 +00:00
Samuel "Sam" Tardieu
e6646eb5fd
needless_else: new lint to check for empty else clauses
2023-05-22 11:52:26 +02:00
Caio
493b2ae8dc
Rename integer_arithmetic
2023-05-14 08:37:12 -03:00
Oli Scherer
def1705a27
Update to a compiletest-rs version that requires //@
for commands
2023-04-20 14:44:03 +00:00
feniljain
b499b7dc73
test: add test for match as stmt no triggering needless_return
2023-04-05 19:50:12 +05:30
J-ZhengLi
8b93eb8a9b
add some adjustment regarding review suggestion
2023-02-15 11:26:30 +08:00
J-ZhengLi
8e96adedd5
fix [needless_return
] incorrect suggestion when returning if sequence
2023-02-14 11:31:42 +08:00
dswij
96e306843e
tests: add case for multiple semis
2023-01-11 07:09:57 +08:00
Niki4tap
9ff868c4ae
test test test
2022-12-23 01:14:07 +03:00
Niki4tap
b6882f6107
Fix FP in needless_return when using yeet
2022-12-22 12:47:39 +03:00
koka
8c50dfb546
Remove blank lines when needless_return returns no value
...
fix https://github.com/rust-lang/rust-clippy/issues/9416
2022-11-27 22:01:21 +09:00
Philipp Krones
bbcde66685
Merge remote-tracking branch 'upstream/master' into rustup
2022-09-28 14:27:32 +02:00
kraktus
b333645971
Add test with unsafe
block to check #9503 is fixed too
...
s
2022-09-22 16:52:25 +02:00
kraktus
5c0cb0deaa
[needless_return
] Recursively remove unneeded semicolons
2022-09-19 12:33:42 +02:00
est31
2be8b73328
Fix clippy
2022-09-15 21:21:18 +02:00
Jason Newcomb
fb41bfa774
Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup
2022-08-31 09:24:45 -04:00
Lukas Lueg
fe93b8d001
Don't lint needless_return
if return
has attrs
...
Fixes #9361
2022-08-26 19:06:07 +02:00
Philipp Krones
09f5df5087
Merge commit '0cb0f7636851f9fcc57085cf80197a2ef6db098f' into clippyup
2022-06-30 10:50:09 +02:00
xFrednet
bdc6ece1b6
Fix #[expect]
for clippy::needless_return
2022-06-25 14:16:31 +02:00
Alex Macleod
eeedf72c33
Use RefCell in needless_return tests
2022-06-18 16:36:47 +00:00
Philipp Krones
f067783461
Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup
2022-06-04 13:34:07 +02:00
dswij
b885035ef7
needless_return
checks for macro expr in return stmts
2022-06-02 20:22:15 +08:00
flip1995
97ab44ca97
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
2021-12-30 15:10:43 +01:00
bors
fc72e910fb
needless_return
suggest return unit type on void returns
...
closes #8177
previously, `needless_return` suggests an empty block `{}` to replace void `return` on match arms, this PR improve the suggestion by suggesting a unit instead.
changelog: `needless_return` suggests `()` instead of `{}` on match arms
2021-12-28 11:15:53 +00:00
flip1995
8fea1d94f3
Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup
2021-12-06 12:33:31 +01:00
Jason Newcomb
2938ffd0d9
Improve heuristics for determining whether eager of lazy evaluation is preferred
2021-11-15 20:54:13 -05:00
flip1995
e674d0a599
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
2021-11-04 12:52:36 +00:00
Andre Bogus
a4ede72b3d
update most tests to 2021 edition
2021-10-30 14:50:53 +02:00
flip1995
5cf4984872
Merge commit 'b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b' into clippyup
2021-10-07 11:21:30 +02:00
hkalbasi
388a3d0983
Implement equatable if let lint
2021-10-04 22:16:42 +03:30
flip1995
23d5457e6d
Merge commit 'cb7915b00c235e9b5861564f3be78dba330980ee' into clippyup
2021-09-28 18:03:12 +01:00
Cameron Steffen
b36591217d
Fix needless_return with let-else
2021-09-18 09:42:51 -05:00
flip1995
02bf692169
Merge commit '98e2b9f25b6db4b2680a3d388456d9f95cb28344' into clippyup
2021-04-22 11:31:13 +02:00
Takayuki
e6c67ad2bf
fix limit_stderr_length error
2021-04-12 21:58:34 +09:00
Takayuki
0218a3b12f
add tests for a false negative on needless_return
2021-04-12 21:37:19 +09:00
flip1995
f6d1f368db
Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup
2021-04-08 17:50:13 +02:00
xFrednet
a6f54f5dfd
Renaming the lint to branches_sharing_code and fixing typos
2021-04-05 13:35:51 +02:00
xFrednet
617c65baa9
Moving shared_code_in_if_blocks to clippy::complexity and running lintcheck
2021-04-05 13:35:51 +02:00
flip1995
ac912be984
Merge commit '95c0459217d1661edfa794c8bb122452b92fb485' into clippyup
2021-01-30 18:06:34 +01:00
ThibsG
e33ab3fdd8
Add test for needless_return
lint
2021-01-18 22:33:25 +01:00
ThibsG
83f1abff48
Fix FP with empty return for needless_return
lint
2021-01-15 18:57:56 +01:00
flip1995
488153ff2f
Merge commit '953f024793dab92745fee9cd2c4dee6a60451771' into clippyup
2021-01-15 10:56:44 +01:00
flip1995
f18cf82ca8
Don't trigger needless_return lint in macros
2021-01-15 10:41:29 +01:00
flip1995
282c59820b
Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup
2020-08-28 18:43:25 +02:00
David Tolnay
ef28361293
Downgrade match_bool to pedantic
2020-04-23 16:30:06 -07:00
Manish Goregaokar
a9a3350455
needless_return: add allow()s to test, make rustfixable
2019-09-25 14:45:18 -07:00
Daniele D'Orazio
e1a78ae528
update tests and fix lints in clippy
2019-06-21 14:17:59 +02:00
Daniele D'Orazio
6396a7a425
make needless_return work with void functions
2019-06-21 13:58:22 +02:00
Philipp Hansch
38d4ac7cea
Remove all copyright license headers
...
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2019-01-08 21:46:39 +01:00