rust-clippy/tests
bors dc17e7317b Auto merge of #10797 - est31:manual_let_else_pattern, r=llogiq
Improve pattern printing for manual_let_else

* Address a formatting issue pointed out in https://github.com/rust-lang/rust-clippy/pull/10175/files#r1137091002
* Replace variables inside | patterns in the if let: `let v = if let V::A(v) | V::B(v) = v { v } else ...`
* Support nested patterns: `let v = if let Ok(Ok(Ok(v))) = v { v } else ...`
* Support tuple structs with more than one arg: `let v = V::W(v, _) = v { v } else ...`; note that more than one *capture* is still not supported, so it bails for `let (v, w) = if let E::F(vi, wi) = x { (vi, wi)}`
* Correctly handle .. in tuple struct patterns: `let v = V::X(v, ..) = v { v } else ...`

- \[ ] Followed [lint naming conventions][lint_naming]
- \[x] Added passing UI tests (including committed `.stderr` file)
- \[x] `cargo test` passes locally
- \[ ] Executed `cargo dev update_lints`
- \[ ] Added lint documentation
- \[x] Run `cargo dev fmt`

[lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints

---

changelog: [`manual_let_else`]: improve variable name in suggestions

Closes #10431 as this PR is adding a test for the `mut` case.
2023-05-27 10:22:40 +00:00
..
test_utils Revert "Dogfood missing_assert_message on Clippy" 2023-03-08 08:51:50 +00:00
ui Auto merge of #10797 - est31:manual_let_else_pattern, r=llogiq 2023-05-27 10:22:40 +00:00
ui-cargo Address Dependabot alerts 2023-05-24 22:08:43 +09:00
ui-internal Merge remote-tracking branch 'upstream/master' into rustup 2023-05-20 15:32:20 +02:00
ui-toml needless_else: new lint to check for empty else clauses 2023-05-22 11:52:26 +02:00
workspace_test Merge commit '97a5daa65908e59744e2bc625b14849352231c75' into clippyup 2022-01-13 13:18:19 +01:00
check-fmt.rs Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup 2022-08-31 09:24:45 -04:00
clippy.toml Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup 2021-06-03 08:41:37 +02:00
compile-test.rs Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup 2023-04-23 13:28:56 +02:00
dogfood.rs Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
integration.rs Revert "Dogfood missing_assert_message on Clippy" 2023-03-08 08:51:50 +00:00
lint_message_convention.rs Stabilize a portion of 'once_cell' 2023-03-29 18:04:44 -04:00
missing-test-files.rs Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup 2022-10-06 09:44:38 +02:00
versioncheck.rs Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyup 2022-12-17 14:12:54 +01:00
workspace.rs Stabilize a portion of 'once_cell' 2023-03-29 18:04:44 -04:00