Commit Graph

18 Commits

Author SHA1 Message Date
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
dswij
b885035ef7 needless_return checks for macro expr in return stmts 2022-06-02 20:22:15 +08: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
Jason Newcomb
2938ffd0d9 Improve heuristics for determining whether eager of lazy evaluation is preferred 2021-11-15 20:54:13 -05:00
Andre Bogus
a4ede72b3d update most tests to 2021 edition 2021-10-30 14:50:53 +02:00
hkalbasi
388a3d0983 Implement equatable if let lint 2021-10-04 22:16:42 +03:30
Cameron Steffen
b36591217d Fix needless_return with let-else 2021-09-18 09:42:51 -05: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
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
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
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