rust/tests
bors 4118738998 Auto merge of #11401 - y21:issue11394, r=xFrednet
[`if_then_some_else_none`]: look into local initializers for early returns

Fixes #11394

As the PR title says, problem was that it only looked for early returns in semi statements. Local variables don't count as such, so it didn't count `let _v = x?;` (or even just `let _ = return;`) as a possible early return and didn't realize that it can't lint then.

Imo the `stmts_contains_early_return` function that was used before is redundant. `contains_return` could already do that if we just made the parameter a bit more generic, just like `for_each_expr`, which can already accept `&[Stmt]`

changelog: [`if_then_some_else_none`]: look into local initializers for early returns
2023-08-28 08:48:35 +00:00
..
test_utils Revert "Dogfood missing_assert_message on Clippy" 2023-03-08 08:51:50 +00:00
ui Auto merge of #11401 - y21:issue11394, r=xFrednet 2023-08-28 08:48:35 +00:00
ui-cargo Merge commit '5436dba826' into clippyup 2023-07-31 23:53:53 +02:00
ui-internal Update ui test crate to auto-detect aux build crate kind 2023-08-11 14:02:35 +00:00
ui-toml Remove redundant auxiliary test files 2023-08-25 14:25:49 +00:00
workspace_test Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00
check-fmt.rs Merge commit 'f51aade56f' into clippyup 2022-08-31 09:24:45 -04:00
clippy.toml
compile-test.rs Use ui_test's Windows path backslash heuristic 2023-08-14 15:59:00 +00:00
dogfood.rs Merge commit '371120bdbf' into clippyup 2023-05-05 17:45:49 +02:00
headers.rs Make a panic message more informative if binary files are accidentally created somewhere in the test folder 2023-08-11 14:01:53 +00:00
integration.rs Merge commit '5436dba826' into clippyup 2023-07-31 23:53:53 +02:00
lint_message_convention.rs Merge commit 'd9c24d1b1e' into clippyup 2023-07-17 10:22:32 +02:00
missing-test-files.rs Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00
versioncheck.rs Merge commit '4bdfb0741d' into clippyup 2022-12-17 14:12:54 +01:00
workspace.rs Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00