diff options
| author | bors <bors@rust-lang.org> | 2023-10-06 17:24:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-10-06 17:24:50 +0000 |
| commit | 3662bd8f587c9305e4d231a9456e63b92b8a7729 (patch) | |
| tree | 1122b527978f00670657f50ba5f28d89a5fb06c5 /compiler/rustc_codegen_gcc/example/std_example.rs | |
| parent | b105fb4c39bc1a010807a6c076193cef8d93c109 (diff) | |
| parent | 68d2082d69d61af56d0b9d73035b274ea0e2e8de (diff) | |
| download | rust-3662bd8f587c9305e4d231a9456e63b92b8a7729.tar.gz rust-3662bd8f587c9305e4d231a9456e63b92b8a7729.zip | |
Auto merge of #11623 - koka831:fix/11619, r=llogiq
Fix ice in `redundant_locals`
Fixes #11619
Rebinding over macro like the code below, idents will be different (`x#4` and `x#0` in that case).
```rust
fn reassign_in_macro() {
let x = 10;
macro_rules! mac {
($i:ident) => {
let mut x = x;
}
}
mac!(y);
}
```
It causes unwrapping `None`.
https://github.com/rust-lang/rust-clippy/blob/9554e477c29e6ddca9e5cdce71524341ef9d48e8/clippy_lints/src/redundant_locals.rs#L88-L98
changelog: ICE: [`redundant_locals`]: No longer lints rebinding over macro
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions
