about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-28 19:13:13 +0000
committerbors <bors@rust-lang.org>2024-02-28 19:13:13 +0000
commit139191b8b7b5ed181249e4a88bc3d7f7c01cce3c (patch)
tree7cc0b3b71f516fab8a84e64277865b2442aeb553 /compiler/rustc_codegen_llvm/src
parentaf91e6ea8c1e1bd2a6ccc52e34741805209f1a21 (diff)
parent0d5934590782b96de8be1c975834847639fac453 (diff)
downloadrust-139191b8b7b5ed181249e4a88bc3d7f7c01cce3c.tar.gz
rust-139191b8b7b5ed181249e4a88bc3d7f7c01cce3c.zip
Auto merge of #12380 - Ethiraric:fix-12358, r=llogiq
[`redundant_closure_call`]: Don't lint if closure origins from a macro

The following code used to trigger the lint:
```rs
 macro_rules! make_closure {
     () => {
         (|| {})
     };
 }
 make_closure!()();
```
The lint would suggest to replace `make_closure!()()` with `make_closure!()`, which changes the code and removes the call to the closure from the macro. This commit fixes that.

Fixes #12358

----

changelog: [`redundant_closure_call`]: If `x!()` returns a closure, don't suggest replacing `x!()()` with `x!()`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions