about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-11-21 23:48:24 +0000
committerbors <bors@rust-lang.org>2021-11-21 23:48:24 +0000
commitde2208a351ae75e093dda3e7f14d48ee12d5be7a (patch)
treeb1911e64722d12a92073c6d0581c5e6d2fa3ac99 /compiler/rustc_codegen_llvm/src
parent32048ebea3bfefd7bbe4d9f8e030a189c93122d5 (diff)
parent846c0bef075922032ea21a42750fdadfe2542e5a (diff)
downloadrust-de2208a351ae75e093dda3e7f14d48ee12d5be7a.tar.gz
rust-de2208a351ae75e093dda3e7f14d48ee12d5be7a.zip
Auto merge of #7997 - surechen:Fixes_7915, r=giraffate
Fixes shadow_same's false positive for #7915

Fix shadow_same's false positive for async function's params(Fixes #7915):

Example Code:
```rust
#![deny(clippy::shadow_same)]

pub async fn foo(_a: i32) {
}
```
Output:
```
error: `_a` is shadowed by itself in `_a
```

Hir:
```rust
pub async fn foo(_a: i32)
 ->
     /*impl Trait*/ #[lang = "from_generator"](move |mut _task_context|
                                                   {
                                                       let _a = _a;
                                                       { let _t = { }; _t }
                                                   })
```

Skip checking async function's params.

changelog: Fix shadow_same's false positive for async function's params
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions