diff options
| author | bors <bors@rust-lang.org> | 2023-06-19 20:30:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-06-19 20:30:35 +0000 |
| commit | 5b60388e5a0979c03da1d3cd170fbd0b7ade6156 (patch) | |
| tree | fa16da0b2039cf33921f12d04a1a0a18eeb15e30 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | f396004b25538d25aa0f94bb774f6385ce1a95e4 (diff) | |
| parent | 3fe2478ecf19d4d62cbdfcf50d57bc00fe5bb242 (diff) | |
| download | rust-5b60388e5a0979c03da1d3cd170fbd0b7ade6156.tar.gz rust-5b60388e5a0979c03da1d3cd170fbd0b7ade6156.zip | |
Auto merge of #10930 - y21:issue9956, r=blyxyas,xFrednet
[`redundant_closure_call`]: handle nested closures Fixes #9956. This ended up being a much larger change than I'd thought, and I ended up having to pretty much rewrite it as a late lint pass, because it needs access to certain things that I don't think are available in early lint passes (e.g. getting the parent expr). I think this'll be required to fi-x #10922 anyway, so this is probably fine. (edit: had to write "fi-x" because "fix" makes github think that this PR fixes it, which it doesn't 😅 ) Previously, it would suggest changing `(|| || 42)()()` to `|| 42()`, which is a type error (it needs parens: `(|| 42)()`). In my opinion, though, the suggested fix should have really been `42`, so that's what this PR changes. changelog: [`redundant_closure_call`]: handle nested closures and rewrite as a late lint pass
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
