Repository: rust
Issue: `unused_variables` suggestion has false positives for variables that are only named in unreachable code
Labels: A-lints,A-diagnostics,T-compiler,C-bug,A-suggestion-diagnostics,D-invalid-suggestion,L-unused_variables

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

Running `cargo clippy --fix` or `cargo +nightly clippy --fix` on this code causes it to break, and tells me to come here and file a bug report

```rust
fn example() -> u8 {
    let result = 0_u8;
    return 0;
    let a = result;
}
```

I think clippy wants to turn result into _result, and then the second result is not found.

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.67.0 (fc594f156 2023-01-24)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: x86_64-unknown-linux-gnu
release: 1.67.0
LLVM version: 15.0.6
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Full output of clippy</summary>
<p>

```
warning: failed to automatically apply fixes suggested by rustc to crate `test_bug`

after fixes were automatically applied the compiler reported errors within these files:

  * src/lib.rs

This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see 
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/rust/issues
quoting the full output of this command we'd be very appreciative!
Note that you may be able to make some more progress in the near-term
fixing code with the `--broken-code` flag

The following errors were reported:
error[E0425]: cannot find value `result` in this scope
 --> src/lib.rs:4:14
  |
4 |     let _a = result;
  |              ^^^^^^ help: a local variable with a similar name exists: `_result`

warning: unreachable statement
 --> src/lib.rs:4:5
  |
3 |     return 0;
  |     -------- any code following this expression is unreachable
4 |     let _a = result;
  |     ^^^^^^^^^^^^^^^^ unreachable statement
  |
  = note: `#[warn(unreachable_code)]` on by default

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0425`.
Original diagnostics will follow.

warning: unreachable statement
 --> src/lib.rs:4:5
  |
3 |     return 0;
  |     -------- any code following this expression is unreachable
4 |     let a = result;
  |     ^^^^^^^^^^^^^^^ unreachable statement
  |
  = note: `#[warn(unreachable_code)]` on by default

warning: unused variable: `result`
 --> src/lib.rs:2:9
  |
2 |     let result = 0_u8;
  |         ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `a`
 --> src/lib.rs:4:9
  |
4 |     let a = result;
  |         ^ help: if this is intentional, prefix it with an underscore: `_a`

warning: function `example` is never used
 --> src/lib.rs:1:10
  |
1 | async fn example() -> u8 {
  |          ^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: `test_bug` (lib test) generated 4 warnings (run `cargo clippy --fix --lib -p test_bug --tests` to apply 2 suggestions)
warning: `test_bug` (lib) generated 4 warnings (4 duplicates)
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
```

</p>
</details>